ci: run tests (#48990)
This commit is contained in:
parent
b928e96166
commit
c7ecf2ca46
|
@ -2,7 +2,20 @@
|
|||
|
||||
pipeline {
|
||||
agent any
|
||||
options {
|
||||
disableConcurrentBuilds()
|
||||
}
|
||||
stages {
|
||||
stage('Unit Tests') {
|
||||
steps {
|
||||
sh 'tox -rv'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
mergeJunitResults()
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Packaging') {
|
||||
steps {
|
||||
script {
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
[tox]
|
||||
envlist = py3-junit-coverage
|
||||
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/combo-plugin-gnm/{env:BRANCH_NAME:}
|
||||
|
||||
[testenv]
|
||||
usedevelop =
|
||||
coverage: True
|
||||
nocoverage: False
|
||||
setenv =
|
||||
DJANGO_SETTINGS_MODULE=combo.settings
|
||||
PASSERELLE_SETTINGS_FILE=tests/settings.py
|
||||
DB_ENGINE=django.db.backends.postgresql_psycopg2
|
||||
SETUPTOOLS_USE_DISTUTILS=stdlib
|
||||
coverage: COVERAGE=--cov-report xml --cov-report html --cov=combo_plugin_gnm/
|
||||
junit: JUNIT=--junitxml=junit-{envname}.xml
|
||||
deps =
|
||||
pytest
|
||||
pytest-cov
|
||||
pytest-django
|
||||
pytest-freezegun
|
||||
WebTest
|
||||
mock<4
|
||||
httmock
|
||||
psycopg2-binary
|
||||
psycopg2
|
||||
vobject
|
||||
django-ratelimit<3
|
||||
django>=2.2,<2.3
|
||||
https://git.entrouvert.org/debian/django-ckeditor.git/snapshot/django-ckeditor-master.tar.gz
|
||||
https://git.entrouvert.org/combo.git/snapshot/combo-master.tar.gz
|
||||
commands =
|
||||
py.test {posargs: {env:JUNIT:} {env:COVERAGE:} tests/}
|
Loading…
Reference in New Issue