jenkins: run tests against python3 (#38781)
This commit is contained in:
parent
00b46fc360
commit
069c2e7d62
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
|
options {
|
||||||
|
disableConcurrentBuilds()
|
||||||
|
timeout(time: 10, unit: 'MINUTES')
|
||||||
|
}
|
||||||
stages {
|
stages {
|
||||||
stage('Unit Tests') {
|
stage('Unit Tests') {
|
||||||
steps {
|
steps {
|
||||||
|
@ -15,7 +19,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()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
12
tox.ini
12
tox.ini
|
@ -1,10 +1,9 @@
|
||||||
[tox]
|
[tox]
|
||||||
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/passerelle/{env:BRANCH_NAME:}
|
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/passerelle/{env:BRANCH_NAME:}
|
||||||
envlist = django111-pg
|
envlist = py2-django111-pg-junit, py3-django111-pg-coverage
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
basepython = python2
|
|
||||||
setenv =
|
setenv =
|
||||||
DJANGO_SETTINGS_MODULE=passerelle.settings
|
DJANGO_SETTINGS_MODULE=passerelle.settings
|
||||||
PASSERELLE_SETTINGS_FILE=tests/settings.py
|
PASSERELLE_SETTINGS_FILE=tests/settings.py
|
||||||
|
@ -13,6 +12,8 @@ setenv =
|
||||||
fast: FAST=--nomigrations
|
fast: FAST=--nomigrations
|
||||||
sqlite: DB_ENGINE=django.db.backends.sqlite3
|
sqlite: DB_ENGINE=django.db.backends.sqlite3
|
||||||
pg: DB_ENGINE=django.db.backends.postgresql_psycopg2
|
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 =
|
deps =
|
||||||
django111: django>=1.11,<1.12
|
django111: django>=1.11,<1.12
|
||||||
psycopg2-binary
|
psycopg2-binary
|
||||||
|
@ -32,7 +33,8 @@ deps =
|
||||||
pytest-httpbin
|
pytest-httpbin
|
||||||
pytest-localserver
|
pytest-localserver
|
||||||
pytest-sftpserver
|
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
|
vobject
|
||||||
django-ratelimit
|
django-ratelimit
|
||||||
pyquery
|
pyquery
|
||||||
|
@ -40,8 +42,8 @@ deps =
|
||||||
zeep<3.3
|
zeep<3.3
|
||||||
commands =
|
commands =
|
||||||
./get_wcs.sh
|
./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/}
|
py.test {posargs: {env:FAST:} {env:COVERAGE:} {env:JUNIT:} tests/}
|
||||||
django111: ./pylint.sh passerelle/
|
coverage: ./pylint.sh passerelle/
|
||||||
|
|
||||||
[pytest]
|
[pytest]
|
||||||
filterwarnings = default
|
filterwarnings = default
|
||||||
|
|
Loading…
Reference in New Issue