aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/cli.yml28
-rw-r--r--lib/python/qmk/tests/test_cli_commands.py2
-rw-r--r--util/travis_test.sh7
3 files changed, 29 insertions, 8 deletions
diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml
new file mode 100644
index 000000000..275581273
--- /dev/null
+++ b/.github/workflows/cli.yml
@@ -0,0 +1,28 @@
1name: CLI CI
2
3on:
4 push:
5 branches:
6 - master
7 - future
8 pull_request:
9 paths:
10 - 'lib/python/**'
11 - 'bin/qmk'
12 - 'requirements.txt'
13 - '.github/workflows/cli.yml'
14
15jobs:
16 test:
17 runs-on: ubuntu-latest
18
19 container: qmkfm/base_container
20
21 steps:
22 - uses: actions/checkout@v1
23 with:
24 submodules: recursive
25 - name: Install dependencies
26 run: pip3 install -r requirements.txt
27 - name: Run tests
28 run: bin/qmk pytest
diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py
index 3f75cef3e..f1a92d9a3 100644
--- a/lib/python/qmk/tests/test_cli_commands.py
+++ b/lib/python/qmk/tests/test_cli_commands.py
@@ -30,7 +30,7 @@ def test_kle2json():
30 30
31 31
32def test_doctor(): 32def test_doctor():
33 result = check_subcommand('doctor') 33 result = check_subcommand('doctor', '-n')
34 assert result.returncode == 0 34 assert result.returncode == 0
35 assert 'QMK Doctor is checking your environment.' in result.stderr 35 assert 'QMK Doctor is checking your environment.' in result.stderr
36 assert 'QMK is ready to go' in result.stderr 36 assert 'QMK is ready to go' in result.stderr
diff --git a/util/travis_test.sh b/util/travis_test.sh
index 95991907e..c6fc0f903 100644
--- a/util/travis_test.sh
+++ b/util/travis_test.sh
@@ -3,7 +3,6 @@
3source util/travis_utils.sh 3source util/travis_utils.sh
4 4
5NUM_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)') 5NUM_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)')
6NUM_PY_CHANGES=$(echo "$QMK_CHANGES" | grep -Ec -e '^(lib/python/)' -e '^(bin/qmk)')
7 6
8if [[ "$TRAVIS_COMMIT_MESSAGE" == *"[skip test]"* ]]; then 7if [[ "$TRAVIS_COMMIT_MESSAGE" == *"[skip test]"* ]]; then
9 echo "Skipping due to commit message" 8 echo "Skipping due to commit message"
@@ -19,10 +18,4 @@ if [ "$LOCAL_BRANCH" == "master" ] || [ "$NUM_CORE_CHANGES" != "0" ]; then
19 18
20fi 19fi
21 20
22if [ "$LOCAL_BRANCH" == "master" ] || [ "$NUM_PY_CHANGES" != "0" ]; then
23 echo "Running python tests."
24 qmk pytest
25 : $((exit_code = $exit_code + $?))
26fi
27
28exit $exit_code 21exit $exit_code