From 9483be8d27af9274953a3d127bd2e6c7dab73575 Mon Sep 17 00:00:00 2001 From: cclauss Date: Tue, 14 Nov 2017 09:29:50 +0100 Subject: [PATCH 1/2] Use Travis CI to run tests on every pull request The owner of the this repo would need to go to https://travis-ci.org/profile and flip the repository switch __on__ to enable free automated flake8 testing of each pull request. Use flake8 to find Python syntax errors and undefined names. There are Python 3 syntax errors and many undefined names which may raise NameError at runtime. Flake8 runs in two passes: The first looks at critical issues in stop-the-build mode and the second looks at style violations in everything-is-a-warning mode. --- .travis.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000..9d94087079 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,21 @@ +language: python +cache: pip +python: + - 2.7 + - 3.6 +matrix: + allow_failures: + - python: 3.6 +install: + #- pip install -r requirements.txt + - pip install flake8 # pytest # add another testing frameworks later +before_script: + # stop the build if there are Python syntax errors or undefined names + - flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics +script: + - true # pytest --capture=sys # add other tests here +notifications: + on_success: change + on_failure: change # `always` will be the setting once code changes slow down From bb2cbb9a374d6b5abf2101dfc351f0f5ff7cbd8e Mon Sep 17 00:00:00 2001 From: cclauss Date: Sun, 21 Oct 2018 10:27:49 +0200 Subject: [PATCH 2/2] npm install ; npm test --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9d94087079..54240d0171 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,8 +14,10 @@ before_script: - flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - npm install script: - - true # pytest --capture=sys # add other tests here + - npm test + #- pytest --capture=sys # add other tests here notifications: on_success: change on_failure: change # `always` will be the setting once code changes slow down