summaryrefslogtreecommitdiff
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 0000000000..2755812735
--- /dev/null
+++ b/.github/workflows/cli.yml
@@ -0,0 +1,28 @@
+name: CLI CI
+
+on:
+ push:
+ branches:
+ - master
+ - future
+ pull_request:
+ paths:
+ - 'lib/python/**'
+ - 'bin/qmk'
+ - 'requirements.txt'
+ - '.github/workflows/cli.yml'
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+
+ container: qmkfm/base_container
+
+ steps:
+ - uses: actions/checkout@v1
+ with:
+ submodules: recursive
+ - name: Install dependencies
+ run: pip3 install -r requirements.txt
+ - name: Run tests
+ 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 3f75cef3e1..f1a92d9a31 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():
def test_doctor():
- result = check_subcommand('doctor')
+ result = check_subcommand('doctor', '-n')
assert result.returncode == 0
assert 'QMK Doctor is checking your environment.' in result.stderr
assert 'QMK is ready to go' in result.stderr
diff --git a/util/travis_test.sh b/util/travis_test.sh
index 95991907ef..c6fc0f9034 100644
--- a/util/travis_test.sh
+++ b/util/travis_test.sh
@@ -3,7 +3,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)')
-NUM_PY_CHANGES=$(echo "$QMK_CHANGES" | grep -Ec -e '^(lib/python/)' -e '^(bin/qmk)')
if [[ "$TRAVIS_COMMIT_MESSAGE" == *"[skip test]"* ]]; then
echo "Skipping due to commit message"
@@ -19,10 +18,4 @@ if [ "$LOCAL_BRANCH" == "master" ] || [ "$NUM_CORE_CHANGES" != "0" ]; then
fi
-if [ "$LOCAL_BRANCH" == "master" ] || [ "$NUM_PY_CHANGES" != "0" ]; then
- echo "Running python tests."
- qmk pytest
- : $((exit_code = $exit_code + $?))
-fi
-
exit $exit_code