forked from mirrors/thatmattlove-hyperglass
moved git CI functions to bash
This commit is contained in:
parent
76ec188d43
commit
20d6b16a8e
3 changed files with 13 additions and 33 deletions
|
|
@ -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 &
|
||||
|
|
|
|||
|
|
@ -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
12
tests/ci_git.sh
Executable 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
|
||||
Loading…
Add table
Reference in a new issue