diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f62a299b1c6e548dd7ef43baa8f84decfb66f145..51954c1e40553a257876155ce95a2aebd2b3951b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -35,7 +35,7 @@ test: script: - source venv/bin/activate - echo "GRANT ALL on *.* to '${MYSQL_USER}';"| mysql -u root --password="${MYSQL_ROOT_PASSWORD}" -h mysql - - pip install pytest-cov + - pip install pytest-cov unittest-xml-reporting - coverage run --source='.' manage.py test --settings AKPlanning.settings_ci - coverage report - coverage xml @@ -45,3 +45,4 @@ test: coverage_report: coverage_format: cobertura path: coverage.xml + junit: unit.xml diff --git a/AKPlanning/settings_ci.py b/AKPlanning/settings_ci.py index 77f75f4ef7c2fcc4a8fa2737e6f196a2a4b58737..c8e6a62e272c2d8985707e25537400983271f2a0 100644 --- a/AKPlanning/settings_ci.py +++ b/AKPlanning/settings_ci.py @@ -24,3 +24,6 @@ DATABASES = { }, } } + +TEST_RUNNER = 'xmlrunner.extra.djangotestrunner.XMLTestRunner' +TEST_OUTPUT_FILE_NAME = 'unit.xml'