From 4aa84aed420a81767d233a1d0b2d4ce74fa77b5a Mon Sep 17 00:00:00 2001 From: Emmanuel Cazenave Date: Tue, 4 Feb 2020 17:29:30 +0100 Subject: [PATCH] run tests against python3 (#39533) --- Jenkinsfile | 2 +- tox.ini | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index eee39f9..661cdae 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -34,7 +34,7 @@ pipeline { utils.publish_coverage_native('index.html') utils.publish_pylint('pylint.out') } - junit '*_results.xml' + mergeJunitResults() } } } diff --git a/tox.ini b/tox.ini index bc2217e..5db8361 100644 --- a/tox.ini +++ b/tox.ini @@ -16,7 +16,7 @@ ; along with this program. If not, see . [tox] -envlist = py2-coverage-pylint +envlist = py2-junit, py3-junit-coverage toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/passerelle-atreal-openads/{env:BRANCH_NAME:} [testenv] @@ -26,12 +26,13 @@ usedevelop = setenv = DJANGO_SETTINGS_MODULE=passerelle.settings PASSERELLE_SETTINGS_FILE=tests/settings.py - coverage: COVERAGE=--junitxml=test_results.xml --cov-report xml --cov-report html --cov=atreal_openads/ + coverage: COVERAGE=--cov-report xml --cov-report html --cov=atreal_openads/ + junit: JUNIT=--junitxml=junit-{envname}.xml deps = http://git.entrouvert.org/passerelle.git/snapshot/passerelle-master.tar.gz pytest-cov pytest-django - pytest>=3.3.0,<4 + pytest>=3.3.0 WebTest mock httmock @@ -40,5 +41,5 @@ deps = django-webtest<1.9.3 xmlschema<1.1 commands = - py.test {env:COVERAGE:} {posargs:tests/} - pylint: ./pylint.sh atreal_openads/ + py.test {posargs: {env:COVERAGE:} {env:JUNIT:} tests/} + coverage: ./pylint.sh atreal_openads/