From 1990e09cd60d9bce9b0df51a75b9eeeb411102f4 Mon Sep 17 00:00:00 2001
From: Dominik George <dominik.george@teckids.org>
Date: Fri, 13 Dec 2019 11:02:19 +0100
Subject: [PATCH] [CI] Enable JUnit report generation on test run

---
 .gitlab-ci.yml | 5 ++++-
 tox.ini        | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f094a6e60..423a005e8 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -23,7 +23,10 @@ test:
   before_script:
     - adduser --disabled-password --gecos "Test User" testuser
   script:
-    - sudo -u testuser tox -e py38
+    - sudo -u testuser tox -e py38 -- --junitxml=.tox/junit.xml
+  artifacts:
+    reports:
+      junit: .tox/junit.xml
 
 lint:
   stage: test
diff --git a/tox.ini b/tox.ini
index 41aaf9ec5..f6c4e4c89 100644
--- a/tox.ini
+++ b/tox.ini
@@ -69,6 +69,7 @@ django_settings_module = biscuit.core.settings
 
 [pytest]
 DJANGO_SETTINGS_MODULE = biscuit.core.settings
+junit_family = legacy
 
 [coverage:run]
 omit =
-- 
GitLab