Skip to content

Commit

Permalink
Use Travis CI to run tests on every pull request
Browse files Browse the repository at this point in the history
This is a second attempt at #1336 which got into a bad git-state...

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. This PR runs 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.
  • Loading branch information
cclauss committed May 14, 2019
1 parent 721eb69 commit 40eceb4
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
dist:xenial
language: python
cache: pip
python:
- 2.7
- 3.7
matrix:
allow_failures:
- python: 3.7
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=E9,F63,F72,F82 --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:
- 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

0 comments on commit 40eceb4

Please sign in to comment.