-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: use Travis CI to run tests on every pull request
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. PR-URL: #1752 Reviewed-By: Rod Vagg <[email protected]>
- Loading branch information
Showing
4 changed files
with
29 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters