Skip to content

Commit

Permalink
Add python tests to the travis check
Browse files Browse the repository at this point in the history
  • Loading branch information
skullydazed committed Sep 7, 2019
1 parent deb6fa6 commit 1013ae2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion util/travis_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit 1013ae2

Please sign in to comment.