jenkins: run tests against python3 (#38781)

This commit is contained in:
Emmanuel Cazenave 2020-01-24 12:20:48 +01:00
parent 00b46fc360
commit 069c2e7d62
2 changed files with 12 additions and 6 deletions

6
Jenkinsfile vendored
View File

@ -2,6 +2,10 @@
pipeline {
agent any
options {
disableConcurrentBuilds()
timeout(time: 10, unit: 'MINUTES')
}
stages {
stage('Unit Tests') {
steps {
@ -15,7 +19,7 @@ pipeline {
utils.publish_coverage_native('index.html')
utils.publish_pylint('pylint.out')
}
junit '*_results.xml'
mergeJunitResults()
}
}
}

12
tox.ini
View File

@ -1,10 +1,9 @@
[tox]
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/passerelle/{env:BRANCH_NAME:}
envlist = django111-pg
envlist = py2-django111-pg-junit, py3-django111-pg-coverage
[testenv]
usedevelop = True
basepython = python2
setenv =
DJANGO_SETTINGS_MODULE=passerelle.settings
PASSERELLE_SETTINGS_FILE=tests/settings.py
@ -13,6 +12,8 @@ setenv =
fast: FAST=--nomigrations
sqlite: DB_ENGINE=django.db.backends.sqlite3
pg: DB_ENGINE=django.db.backends.postgresql_psycopg2
coverage: COVERAGE=--junitxml=junit-{envname}.xml --cov-report xml --cov-report html --cov=passerelle/ --cov-config .coveragerc -Wignore
junit: JUNIT=--junitxml=junit-{envname}.xml
deps =
django111: django>=1.11,<1.12
psycopg2-binary
@ -32,7 +33,8 @@ deps =
pytest-httpbin
pytest-localserver
pytest-sftpserver
http://quixote.python.ca/releases/Quixote-2.7b2.tar.gz
py2: http://quixote.python.ca/releases/Quixote-2.7b2.tar.gz
py3: Quixote
vobject
django-ratelimit
pyquery
@ -40,8 +42,8 @@ deps =
zeep<3.3
commands =
./get_wcs.sh
django111: py.test {posargs: {env:FAST:} --junitxml=test_{envname}_results.xml --cov-report xml --cov-report html --cov=passerelle/ --cov-config .coveragerc tests/}
django111: ./pylint.sh passerelle/
py.test {posargs: {env:FAST:} {env:COVERAGE:} {env:JUNIT:} tests/}
coverage: ./pylint.sh passerelle/
[pytest]
filterwarnings = default