diff --git a/.travis.yml b/.travis.yml index 1c9de78..7415f65 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 & diff --git a/tests/check_code.sh b/tests/check_code.sh deleted file mode 100755 index 0b0a363..0000000 --- a/tests/check_code.sh +++ /dev/null @@ -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 diff --git a/tests/ci_git.sh b/tests/ci_git.sh new file mode 100755 index 0000000..7dbfa62 --- /dev/null +++ b/tests/ci_git.sh @@ -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