Add flake8 checks to travis configuration.
This should give us some coverage for python3 compatibility and extra
checking beyond the unit tests.
Thanks cclauss@bluewin.ch for the patch! (see
https://github.com/chromium/gyp/pull/1)
Bug: gyp:36
Change-Id: I50fae17776d417daeb876ff56d83649c27b16393
Reviewed-on: https://chromium-review.googlesource.com/c/external/gyp/+/1368753
Reviewed-by: Mark Mentovai <mark@chromium.org>
diff --git a/.travis.yml b/.travis.yml
index 01555ff..4733130 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,11 +1,23 @@
language: cpp
-compiler:
- - clang
+matrix:
+ include:
+ - os: linux
+ compiler: clang
+ - os: osx
+ compiler: clang
+ - python: 2.7
+ language: python
+ before_install: pip install flake8
+ script: flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
+ - python: 3.7
+ language: python
+ before_install: pip install flake8
+ script: flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
+ dist: xenial # required for Python >= 3.7 (travis-ci/travis-ci#9069)
+
before_install: ./buildbot/travis-checkout.sh
script: ./buildbot/travis-test.sh
-os:
- - linux
- - osx
+
branches:
only:
- master