ci: speed up CI using multiple processes with pytest (#67083)

This commit is contained in:
Agate 2022-07-06 15:59:51 +02:00
parent ee246803f3
commit 245d5c9d9e
2 changed files with 4 additions and 2 deletions

2
Jenkinsfile vendored
View File

@ -8,7 +8,7 @@ pipeline {
stages {
stage('Unit Tests') {
steps {
sh 'tox -rv'
sh 'NUMPROCESSES=6 tox -rv '
}
post {
always {

View File

@ -19,6 +19,7 @@ commands =
[testenv]
usedevelop = true
setenv =
NUMPROCESSES={env:NUMPROCESSES:1}
DJANGO_SETTINGS_MODULE=bijoe.settings
BIJOE_SETTINGS_FILE=tests/settings.py
SETUPTOOLS_USE_DISTUTILS=stdlib
@ -30,6 +31,7 @@ deps =
pytest-cov
pytest-django
pytest-freezegun
pytest-xdist
WebTest
django-webtest<1.9.3
mock
@ -41,7 +43,7 @@ deps =
dj22: djangorestframework>=3.7
dj22: https://git.entrouvert.org/hobo.git/snapshot/hobo-main.tar.gz
commands =
py3-dj22: py.test {posargs: --junitxml=test_{envname}_results.xml --cov-report xml --cov-report html --cov=bijoe tests/}
py3-dj22: py.test {posargs: --numprocesses {env:NUMPROCESSES:1} --junitxml=test_{envname}_results.xml --cov-report xml --cov-report html --cov=bijoe tests/}
[pytest]
filterwarnings =