diff --git a/Jenkinsfile b/Jenkinsfile index 59ef520..24711b1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,7 +8,7 @@ pipeline { stages { stage('Unit Tests') { steps { - sh 'tox -rv' + sh 'NUMPROCESSES=6 tox -rv' } post { always { diff --git a/tox.ini b/tox.ini index 8fdd660..11cf41e 100644 --- a/tox.ini +++ b/tox.ini @@ -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 django32: django-webtest mock @@ -43,8 +45,21 @@ deps = django32: djangorestframework>=3.7 django32: https://git.entrouvert.org/entrouvert/hobo/archive/main.tar.gz commands = - py3-django32: py.test {posargs: --junitxml=test_{envname}_results.xml --cov-report xml --cov-report html --cov=bijoe tests/} + py3-django32: py.test {posargs: --junitxml=test_{envname}_results.xml --cov-report xml --cov-report html --cov=bijoe --cov-config=tox.ini --numprocesses {env:NUMPROCESSES:1} tests/} [pytest] filterwarnings = once:.* + +[coverage:run] +source = + authentic2 + authentic2_auth_fc + authentic2_auth_oidc + authentic2_auth_saml + authentic2_idp_cas + authentic2_idp_oidc + django_rbac + +[coverage:html] +show_contexts = True