From 279abb7753101bd8105f6a3fe03aa621e96b1d51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Tue, 12 Nov 2019 14:20:07 +0100 Subject: [PATCH] tox: run tests against python 3 (#36515) --- Jenkinsfile | 9 +++++++-- tox.ini | 8 +++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7d7c1c307..20f74f6b4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,9 +4,9 @@ pipeline { agent any options { disableConcurrentBuilds() } stages { - stage('Unit Tests') { + stage('Unit Tests (Python 2)') { steps { - sh 'tox -r' + sh 'tox -r -e py2-pylint-coverage' } post { always { @@ -20,6 +20,11 @@ pipeline { } } } + stage('Unit Tests (Python 3)') { + steps { + sh 'tox -r -e py3' + } + } stage('Packaging') { steps { script { diff --git a/tox.ini b/tox.ini index e7d45a8c4..dd67ea7a0 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/wcs/{env:BRANCH_NAME:} -envlist = py2-pylint-coverage +envlist = py2-pylint-coverage,py3 [testenv] sitepackages = true @@ -16,7 +16,8 @@ setenv = passenv = USER deps = - pytest + py2: pytest + py3: pytest>=3.6,<5 pytest-mock pytest-cov pytest-django @@ -29,6 +30,7 @@ deps = django-ratelimit<3 pyproj pylint<1.8 + py3: Quixote>=3.0 commands = - py.test {env:COVERAGE:} {posargs:tests/} + py.test -v {env:COVERAGE:} {posargs:tests/} pylint: ./pylint.sh wcs/