tox.ini: run junit and coverage only on jenkins

This commit is contained in:
Benjamin Dauvergne 2021-11-20 23:40:35 +01:00
parent 14cce9490b
commit c0d88eb73e
1 changed files with 6 additions and 1 deletions

View File

@ -12,10 +12,15 @@ envlist =
setenv =
DJANGO_SETTINGS_MODULE=eo_gestion.settings
BARBACOMPTA_SETTINGS_FILE=tests/settings.py
JUNIT={tty::-o junit_suite_name={envname} --junit-xml=junit-{envname}.xml}
COVERAGE_CONFIG=--cov --cov-append --cov-report xml --cov-report html --cov-config=tox.ini
COVERAGE={tty::{env:COVERAGE_CONFIG}}
# run with "-e py3-coverage" to get coverage
coverage: COVERAGE={env:COVERAGE_CONFIG}
deps =
-rtest-requirements.txt
commands =
py.test {posargs: --junitxml=junit-{envname}.xml --cov-report xml --cov-report html --cov=eo_gestion/ tests/}
py.test {env:COVERAGE:} {env:JUNIT:} {posargs}
#
# pytest config