Skip to content

Commit

Permalink
Reduce travis load by replacing an exclusive grep with an inclusive g…
Browse files Browse the repository at this point in the history
…rep (qmk#10964)

* add -n to avoid compiling

* switch to an include rather than exclude strategy
  • Loading branch information
skullydazed authored Nov 30, 2020
1 parent 485e452 commit 8724a70
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/python/qmk/tests/test_cli_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def test_compile():


def test_compile_json():
result = check_subcommand('compile', '-kb', 'handwired/onekey/pytest', '-km', 'default_json')
result = check_subcommand('compile', '-kb', 'handwired/onekey/pytest', '-km', 'default_json', '-n')
check_returncode(result)


Expand Down
2 changes: 0 additions & 2 deletions util/travis_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

source util/travis_utils.sh

NUM_CORE_CHANGES=$(echo "$QMK_CHANGES" | grep -Ecv -e '^(docs/)' -e '^(keyboards/)' -e '^(layouts/)' -e '^(util/)' -e '^(lib/python/)' -e '^(bin/qmk)' -e '^(requirements.txt)' -e '(.travis.yml)')

if [[ "$TRAVIS_COMMIT_MESSAGE" == *"[skip build]"* ]]; then
echo "Skipping due to commit message"
exit 0
Expand Down
2 changes: 0 additions & 2 deletions util/travis_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

source util/travis_utils.sh

NUM_CORE_CHANGES=$(echo "$QMK_CHANGES" | grep -Ecv -e '^(docs/)' -e '^(keyboards/)' -e '^(layouts/)' -e '^(util/)' -e '^(lib/python/)' -e '^(bin/qmk)' -e '^(requirements.txt)' -e '(.travis.yml)')

if [[ "$TRAVIS_COMMIT_MESSAGE" == *"[skip test]"* ]]; then
echo "Skipping due to commit message"
exit 0
Expand Down
1 change: 1 addition & 0 deletions util/travis_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE:-HEAD~1..HEAD}"
# Extra variables
LOCAL_BRANCH=$(git rev-parse --abbrev-ref HEAD)
QMK_CHANGES=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE})
NUM_CORE_CHANGES=$(echo "$QMK_CHANGES" | grep -Ec -e '^Makefile' -e '^[^/]*.mk' -e '^drivers/' -e '^lib/atsam' -e '^lib/lib8tion/' -e '^platforms' -e '^quantum' -e '^tests' -e '^tmk_core')

# if docker is installed - patch calls to within the qmk docker image
if command -v docker >/dev/null; then
Expand Down

0 comments on commit 8724a70

Please sign in to comment.