From 05ae4f88ea10ebb59ff3931ca88b89a29be2d06b Mon Sep 17 00:00:00 2001 From: cclauss Date: Tue, 11 Jul 2017 05:27:16 +0200 Subject: [PATCH] Add automated testing The goal of this change is to have Travis-CI automatically run [flake8](http://flake8.readthedocs.io) tests on every pull request. This will help contributors know if their submissions are going to *break the build*. To turn on this **free** service, you would need to do steps 1 and 2 of https://docs.travis-ci.com/user/getting-started/ --- .travis.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..b790721a --- /dev/null +++ b/.travis.yml @@ -0,0 +1,16 @@ +sudo: false +dist: trusty +language: python +python: + - 2.7.13 + - 3.6.1 +install: + - pip install flake8 +script: + # stop the build if there are Python syntax errors or undefined names + - flake8 . --count --select=E901,E999,F821,F822,F823 --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 +notifications: + on_success: change + on_failure: change # `always` will be the setting once code changes slow down