1
0
Fork 1
mirror of https://github.com/thatmattlove/hyperglass.git synced 2026-01-17 08:48:05 +00:00

moved git CI functions to bash

This commit is contained in:
checktheroads 2019-06-17 02:04:42 -07:00
parent 76ec188d43
commit 20d6b16a8e
3 changed files with 13 additions and 33 deletions

View file

@ -11,15 +11,10 @@ install:
before_script:
- pip3 install -r ./tests/requirements_dev.txt
- pip3 install anybadge
- git config --global user.email "travis@travis-ci.org"
- git config --global user.name "Travis CI"
- git checkout master
- black hyperglass
- git add hyperglass/ *.py
- git commit --message "Black Formatting - travis $TRAVIS_BUILD_NUMBER"
- python3 ./manage.py pylint-badge --integer-only True
- git add pylint.svg
- git commit --message "Pylint Badge - travis $TRAVIS_BUILD_NUMBER"
- sh ./tests/ci_git.sh
- python3 ./tests/ci_prepare.py
script:
- nohup python3 ./tests/ci_dev_server.py &

View file

@ -1,27 +0,0 @@
#!/bin/sh
setup_git() {
git config --global user.email "travis@travis-ci.org"
git config --global user.name "Travis CI"
}
check_format() {
black hyperglass
git checkout master
git add hyperglass/ *.py
git commit --message "Black Formatting - travis #$TRAVIS_BUILD_NUMBER"
echo "Completed Black Formatting"
}
check_pylint() {
PYLINT_SCORE=$(python3 manage.py pylint-badge --integer-only True)
echo "Pylint score: $PYLINT_SCORE"
git checkout master
git add pylint.svg
git commit --message "Pylint Badge - travis #$TRAVIS_BUILD_NUMBER"
echo "Completed Pylint Check & Badge Creation"
}
setup_git
check_format
check_pylint

12
tests/ci_git.sh Executable file
View file

@ -0,0 +1,12 @@
#!/bin/sh
setup_git() {
git config --global user.email "travis@travis-ci.org"
git config --global user.name "Travis CI"
git add hyperglass/ *.py
git commit --message "Black Formatting - travis $TRAVIS_BUILD_NUMBER"
git add pylint.svg
git commit --message "Pylint Badge - travis $TRAVIS_BUILD_NUMBER"
}
setup_git