mirror of
https://github.com/linux-system-roles/network.git
synced 2026-07-18 00:46:05 +00:00
Run tests for python 2.6 and 3.7, too
This commit is contained in:
parent
9f00e45818
commit
7c51a71cf4
2 changed files with 47 additions and 10 deletions
|
|
@ -2,10 +2,13 @@ sudo: false
|
|||
dist: trusty
|
||||
language: python
|
||||
python:
|
||||
- 2.6
|
||||
- 2.7
|
||||
- 3.6
|
||||
- 3.7-dev
|
||||
|
||||
install:
|
||||
- pip install tox
|
||||
- pip install tox tox-travis
|
||||
|
||||
script:
|
||||
- tox -e check-py27,check-py36,coveralls
|
||||
- tox
|
||||
|
|
|
|||
50
tox.ini
50
tox.ini
|
|
@ -1,28 +1,42 @@
|
|||
[tox]
|
||||
envlist = flake8, pylint, check-{py27,py36}
|
||||
envlist = flake8, pylint, py{26,27,36,37}
|
||||
skipsdist = true
|
||||
skip_missing_interpreters = True
|
||||
|
||||
[testenv]
|
||||
basepython = python2.7
|
||||
deps =
|
||||
py{26,27,36,37}: pytest-cov
|
||||
py{27,36,37}: pytest>=3.5.1
|
||||
py26: pytest
|
||||
|
||||
[base]
|
||||
passenv = *
|
||||
setenv =
|
||||
PYTHONPATH = {toxinidir}/src
|
||||
LC_ALL = C
|
||||
deps =
|
||||
pytest-cov
|
||||
pytest>=3.5.1
|
||||
changedir = {toxinidir}/tests
|
||||
covtarget = network_connections
|
||||
pytesttarget = .
|
||||
|
||||
[testenv:check-py27]
|
||||
[testenv:py26]
|
||||
passenv = {[base]passenv}
|
||||
setenv =
|
||||
{[base]setenv}
|
||||
hangedir = {[base]changedir}
|
||||
basepython = python2.6
|
||||
commands =
|
||||
pytest \
|
||||
--durations=5 \
|
||||
--cov={[base]covtarget} \
|
||||
--cov-report=html:htmlcov-py26 --cov-report=term \
|
||||
{posargs} \
|
||||
{[base]pytesttarget}
|
||||
|
||||
[testenv:py27]
|
||||
passenv = {[base]passenv}
|
||||
setenv =
|
||||
{[base]setenv}
|
||||
deps = {[base]deps}
|
||||
changedir = {[base]changedir}
|
||||
basepython = python2.7
|
||||
commands =
|
||||
|
|
@ -33,11 +47,10 @@ commands =
|
|||
{posargs} \
|
||||
{[base]pytesttarget}
|
||||
|
||||
[testenv:check-py36]
|
||||
[testenv:py36]
|
||||
passenv = {[base]passenv}
|
||||
setenv =
|
||||
{[base]setenv}
|
||||
deps = {[base]deps}
|
||||
changedir = {[base]changedir}
|
||||
basepython = python3.6
|
||||
commands =
|
||||
|
|
@ -48,6 +61,20 @@ commands =
|
|||
{posargs} \
|
||||
{[base]pytesttarget}
|
||||
|
||||
[testenv:py37]
|
||||
passenv = {[base]passenv}
|
||||
setenv =
|
||||
{[base]setenv}
|
||||
changedir = {[base]changedir}
|
||||
basepython = python3.7
|
||||
commands =
|
||||
pytest \
|
||||
--durations=5 \
|
||||
--cov={[base]covtarget} \
|
||||
--cov-report=html:htmlcov-py37 --cov-report=term \
|
||||
{posargs} \
|
||||
{[base]pytesttarget}
|
||||
|
||||
[testenv:pylint]
|
||||
setenv =
|
||||
{[base]setenv}
|
||||
|
|
@ -81,3 +108,10 @@ addopts = -rxs
|
|||
|
||||
[flake8]
|
||||
show_source = True
|
||||
|
||||
[travis]
|
||||
python =
|
||||
2.6: py26
|
||||
2.7: py27,coveralls
|
||||
3.6: py36
|
||||
3.7: py37
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue