Merge pull request #3578 from jdufresne/tox-flake8

Add linting to the tox matrix
This commit is contained in:
Hugo 2019-01-27 14:11:32 +02:00 committed by GitHub
commit 6aef6fc793
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 4 deletions

View File

@ -65,7 +65,7 @@ services:
install: install:
- | - |
if [ "$LINT" == "true" ]; then if [ "$LINT" == "true" ]; then
pip install -U check-manifest flake8 pip install tox
elif [ "$DOCKER" == "" ]; then elif [ "$DOCKER" == "" ]; then
.travis/install.sh; .travis/install.sh;
fi fi
@ -84,8 +84,7 @@ before_script:
script: script:
- | - |
if [ "$LINT" == "true" ]; then if [ "$LINT" == "true" ]; then
flake8 --statistics --count tox -e lint
check-manifest
elif [ "$DOCKER" == "" ]; then elif [ "$DOCKER" == "" ]; then
.travis/script.sh .travis/script.sh
elif [ "$DOCKER" ]; then elif [ "$DOCKER" ]; then

14
tox.ini
View File

@ -4,7 +4,10 @@
# and then run "tox" from this directory. # and then run "tox" from this directory.
[tox] [tox]
envlist = py27, py35, py36, py37 envlist =
lint
py{27,35,36,37}
minversion = 1.9
[testenv] [testenv]
commands = commands =
@ -18,3 +21,12 @@ deps =
olefile olefile
pyroma pyroma
pytest pytest
[testenv:lint]
commands =
flake8 --statistics --count
check-manifest
deps =
check-manifest
flake8
skip_install = true