diff options
author | skullY <skullydazed@gmail.com> | 2019-08-29 12:24:27 -0700 |
---|---|---|
committer | skullydazed <skullydazed@users.noreply.github.com> | 2019-09-07 07:58:41 -0700 |
commit | 1013ae2d34dc34e0e7d63fe875e70801ded3673c (patch) | |
tree | c179a05c8cbdc9b7d1a1ce9d3d6af14379bd740c | |
parent | deb6fa6a87b12fcdbf577837c6faeb854cd287c7 (diff) |
Add python tests to the travis check
-rwxr-xr-x | util/travis_build.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/util/travis_build.sh b/util/travis_build.sh index fd5511a72b..3fff768f6f 100755 --- a/util/travis_build.sh +++ b/util/travis_build.sh @@ -22,7 +22,7 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then eval $MAKE_ALL : $((exit_code = $exit_code + $?)) else - NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | grep -Ev '^(docs/)' | wc -l) + NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | grep -Ev '^(docs/)' | wc -l) BRANCH=$(git rev-parse --abbrev-ref HEAD) # is this branch master or a "non docs, non keyboards" change if [ $NEFM -gt 0 -o "$BRANCH" = "master" ]; then @@ -51,6 +51,14 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then fi done fi + # Check and run python tests if necessary + PFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -E '^(lib/python/)' | wc -l) + if [ $PFM -gt 0 -o "$BRANCH" = "master" ]; then + echo + echo "Running python tests." + bin/qmk nose2 + : $((exit_code = $exit_code + $?)) + fi fi exit $exit_code fi |