python3: update tox to check against both python versions

This commit is contained in:
Frédéric Péters 2020-01-19 19:37:20 +01:00
parent 2b3b7c7707
commit fbc3c6541f
2 changed files with 8 additions and 7 deletions

2
Jenkinsfile vendored
View File

@ -16,7 +16,7 @@ pipeline {
utils.publish_coverage_native('index.html') utils.publish_coverage_native('index.html')
utils.publish_pylint('pylint.out') utils.publish_pylint('pylint.out')
} }
junit '*_results.xml' mergeJunitResults()
} }
} }
} }

13
tox.ini
View File

@ -1,6 +1,6 @@
[tox] [tox]
envlist = py27-django111 envlist = py27-django111-coverage-pylint,py3-django111
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/welco/ toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/welco/{env:BRANCH_NAME:}
[testenv] [testenv]
usedevelop = usedevelop =
@ -9,12 +9,13 @@ setenv =
DJANGO_SETTINGS_MODULE=welco.settings DJANGO_SETTINGS_MODULE=welco.settings
WELCO_SETTINGS_FILE=tests/settings.py WELCO_SETTINGS_FILE=tests/settings.py
fast: FAST=--nomigrations fast: FAST=--nomigrations
coverage: COVERAGE=--junitxml=junit-{envname}.xml --cov-report xml --cov-report html --cov=welco/
deps = deps =
django111: django>=1.11,<1.12 django111: django>=1.11,<1.12
pytest-cov pytest-cov
pytest-django pytest-django
pytest<4.1 pytest!=5.3.3
attrs<19.2 attrs
WebTest WebTest
mock mock
httmock httmock
@ -26,5 +27,5 @@ deps =
lxml lxml
git+https://git.entrouvert.org/debian/django-ckeditor.git git+https://git.entrouvert.org/debian/django-ckeditor.git
commands = commands =
django111: ./pylint.sh welco/ pylint: ./pylint.sh welco/
django111: py.test {posargs: --junitxml=test_{envname}_results.xml --cov-report xml --cov-report html --cov=welco/ tests/} py.test {env:COVERAGE:} {posargs:tests/}