Test all supported pytest versions (plus more python interpreters) (#265)
Test all supported pytest versions (plus more python interpreters) and pytest-xdist
This commit is contained in:
parent
f7a30fc843
commit
f1a3e45e51
40
.travis.yml
40
.travis.yml
|
@ -1,17 +1,39 @@
|
|||
sudo: false
|
||||
language: python
|
||||
python: "3.4"
|
||||
env:
|
||||
python: "2.7"
|
||||
|
||||
matrix:
|
||||
- TESTENV=linters
|
||||
- TESTENV=py27
|
||||
# - TESTENV=py27-xdist
|
||||
- TESTENV=py27-pytest-latest
|
||||
- TESTENV=py34
|
||||
- TESTENV=coveralls
|
||||
include:
|
||||
- env: TOXENV=py27-pytestlatest-linters
|
||||
- env: TOXENV=py27-pytest29
|
||||
- env: TOXENV=py27-pytest30
|
||||
- env: TOXENV=py27-pytest31
|
||||
- env: TOXENV=py27-pytest32
|
||||
- env: TOXENV=py27-pytest33
|
||||
- env: TOXENV=py27-pytest34
|
||||
- env: TOXENV=py27-pytest35
|
||||
- env: TOXENV=py27-pytest36
|
||||
- env: TOXENV=py27-pytest37
|
||||
- env: TOXENV=py27-pytest38
|
||||
- env: TOXENV=py27-pytest39
|
||||
- env: TOXENV=py27-pytestlatest
|
||||
- env: TOXENV=py27-pytestlatest-xdist
|
||||
- env: TOXENV=py34-pytestlatest
|
||||
python: "3.4"
|
||||
- env: TOXENV=py35-pytestlatest
|
||||
python: "3.5"
|
||||
- env: TOXENV=py36-pytestlatest
|
||||
python: "3.6"
|
||||
- env: TOXENV=py37-pytestlatest
|
||||
python: "3.7"
|
||||
# Currently, python 3.7 is a little bit tricky to install:
|
||||
# https://github.com/travis-ci/travis-ci/issues/9069#issuecomment-425720905
|
||||
sudo: required
|
||||
dist: xenial
|
||||
- env: TOXENV=py27-pytestlatest-coveralls
|
||||
install:
|
||||
- pip install tox
|
||||
script: tox -e $TESTENV --recreate
|
||||
script: tox --recreate
|
||||
branches:
|
||||
except:
|
||||
- /^\d/
|
||||
|
|
|
@ -2,4 +2,3 @@ mock
|
|||
pytest-pep8
|
||||
coverage<4.0a1
|
||||
pytest-cache
|
||||
pytest-xdist
|
||||
|
|
46
tox.ini
46
tox.ini
|
@ -1,38 +1,36 @@
|
|||
[tox]
|
||||
distshare={homedir}/.tox/distshare
|
||||
#envlist=linters,py27,py27-xdist,py27-pytest-latest,py34
|
||||
envlist=linters,py27,py27-pytest-minimal,py27-pytest-latest,py34
|
||||
envlist=py27-pytestlatest-linters,py27-pytest{29,30,31,32,33,34,35,36,37,38,39,latest},py{34,35,36,37}-pytestlatest,py27-pytestlatest-xdist
|
||||
skip_missing_interpreters = true
|
||||
|
||||
[testenv]
|
||||
deps =
|
||||
pytestlatest: pytest
|
||||
pytest39: pytest~=3.9.0
|
||||
pytest38: pytest~=3.8.0
|
||||
pytest37: pytest~=3.7.0
|
||||
pytest36: pytest~=3.6.0
|
||||
pytest35: pytest~=3.5.0
|
||||
pytest34: pytest~=3.4.0
|
||||
pytest33: pytest~=3.3.0
|
||||
pytest32: pytest~=3.2.0
|
||||
pytest31: pytest~=3.1.0
|
||||
pytest30: pytest~=3.0.0
|
||||
pytest29: pytest~=2.9.0
|
||||
pytest30,pytest29: pytest-warnings
|
||||
-r{toxinidir}/requirements-testing.txt
|
||||
commands = py.test tests --junitxml={envlogdir}/junit-{envname}.xml
|
||||
deps = -r{toxinidir}/requirements-testing.txt
|
||||
|
||||
[testenv:linters]
|
||||
interpreter=python2.7
|
||||
[testenv:py27-pytestlatest-linters]
|
||||
commands={[testenv]commands} pytest_bdd --pep8 -m pep8
|
||||
|
||||
[testenv:py27-xdist]
|
||||
basepython=python2.7
|
||||
commands=
|
||||
py.test pytest_bdd tests -n3 --pep8 -rfsxX \
|
||||
--junitxml={envlogdir}/junit-{envname}.xml
|
||||
|
||||
[testenv:py27-pytest-latest]
|
||||
basepython=python2.7
|
||||
[testenv:py27-pytestlatest-xdist]
|
||||
deps =
|
||||
pytest-xdist
|
||||
{[testenv]deps}
|
||||
git+https://github.com/pytest-dev/py#egg=py
|
||||
git+https://github.com/pytest-dev/pytest.git@features#egg=pytest
|
||||
commands={[testenv]commands} -n3 -rfsxX
|
||||
|
||||
[testenv:py27-pytest-minimal]
|
||||
basepython=python2.7
|
||||
deps =
|
||||
pytest==2.9.0
|
||||
pytest-xdist==1.17
|
||||
mock
|
||||
|
||||
[testenv:coveralls]
|
||||
[testenv:py27-pytestlatest-coveralls]
|
||||
passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH
|
||||
usedevelop = True
|
||||
changedir = .
|
||||
|
@ -40,7 +38,7 @@ deps =
|
|||
{[testenv]deps}
|
||||
coveralls
|
||||
commands=
|
||||
coverage run --source=pytest_bdd {envdir}/bin/py.test tests
|
||||
coverage run --branch --source=pytest_bdd {envbindir}/pytest tests
|
||||
coverage report -m
|
||||
coveralls
|
||||
|
||||
|
|
Loading…
Reference in New Issue