tox/travis: improve nodilate testing
'tox' run locally should only exercise sensible combinations (py27-nodilate, py34-nodilate, py35/36/37 with dilate). Travis will run exactly these by using a different script for each version of python. Also added a separate flake8 builder (which uses a small subset of warnings, as the default set is currently much too noisy).
This commit is contained in:
parent
ddba0fc840
commit
42d849fe52
19
.travis.yml
19
.travis.yml
|
@ -11,30 +11,27 @@ branches:
|
|||
- /^WIP-.*$/
|
||||
install:
|
||||
- pip install -U pip tox virtualenv codecov
|
||||
before_script:
|
||||
- if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then
|
||||
pip install -U flake8 ;
|
||||
flake8 *.py src --count --select=E901,E999,F821,F822,F823 --statistics ;
|
||||
fi
|
||||
script:
|
||||
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 || $TRAVIS_PYTHON_VERSION == 3.4 ]]; then
|
||||
tox -e no-dilate ;
|
||||
else
|
||||
tox -e coverage ;
|
||||
fi
|
||||
after_success:
|
||||
- codecov
|
||||
matrix:
|
||||
include:
|
||||
- python: 2.7
|
||||
script: tox -e py27-nodilate
|
||||
- python: 3.4
|
||||
script: tox -e py34-nodilate
|
||||
- python: 3.5
|
||||
script: tox -e py35-coverage
|
||||
- python: 3.6
|
||||
script: tox -e py36-coverage
|
||||
- python: 3.7
|
||||
# we don't actually need sudo, but that kicks us onto GCE, which lets
|
||||
# us get xenial
|
||||
sudo: true
|
||||
dist: xenial
|
||||
script: tox -e py37-coverage
|
||||
- python: nightly
|
||||
script: tox -e py-coverage
|
||||
- python: 3.6
|
||||
script: tox -e flake8
|
||||
allow_failures:
|
||||
- python: nightly
|
||||
|
|
29
tox.ini
29
tox.ini
|
@ -4,22 +4,25 @@
|
|||
# and then run "tox" from this directory.
|
||||
|
||||
[tox]
|
||||
envlist = {py27,py34,py35,py36,py37,pypy,flake8}
|
||||
# useful envs: py27-nodilate, py34-nodilate, py35, py36, py37, pypy, flake8
|
||||
envlist = {py27-nodilate,py34-nodilate,py35,py36,py37}
|
||||
skip_missing_interpreters = True
|
||||
minversion = 2.4.0
|
||||
|
||||
[testenv]
|
||||
usedevelop = True
|
||||
extras = dev,dilate
|
||||
extras =
|
||||
nodilate: dev
|
||||
!nodilate: dev, dilate
|
||||
deps =
|
||||
pyflakes >= 1.2.3
|
||||
coverage: coverage
|
||||
commands =
|
||||
pyflakes setup.py src
|
||||
wormhole --version
|
||||
python -m wormhole.test.run_trial {posargs:wormhole}
|
||||
|
||||
[testenv:no-dilate]
|
||||
extras = dev
|
||||
!coverage: python -m wormhole.test.run_trial {posargs:wormhole}
|
||||
coverage: coverage run --branch -m wormhole.test.run_trial {posargs:wormhole}
|
||||
coverage: coverage xml
|
||||
|
||||
# on windows, trial is installed as venv/bin/trial.py, not .exe, but (at
|
||||
# least appveyor) adds .PY to $PATHEXT. So "trial wormhole" might work on
|
||||
|
@ -29,16 +32,6 @@ extras = dev
|
|||
# vary on the platform. So we added a small class (wormhole.test.run_trial)
|
||||
# that does the right import for us.
|
||||
|
||||
[testenv:coverage]
|
||||
deps =
|
||||
pyflakes >= 1.2.3
|
||||
coverage
|
||||
commands =
|
||||
pyflakes setup.py src
|
||||
wormhole --version
|
||||
coverage run --branch -m wormhole.test.run_trial {posargs:wormhole}
|
||||
coverage xml
|
||||
|
||||
[testenv:flake8]
|
||||
deps = flake8
|
||||
commands = flake8 src/wormhole
|
||||
|
@ -47,3 +40,7 @@ commands = flake8 src/wormhole
|
|||
ignore = E741,W503,W504
|
||||
exclude = .git,__pycache__,docs/source/conf.py,old,build,dist
|
||||
max-complexity = 40
|
||||
|
||||
[testenv:flake8less]
|
||||
deps = flake8
|
||||
commands = flake8 --select=E901,E999,F821,F822,F823 src/wormhole
|
||||
|
|
Loading…
Reference in New Issue
Block a user