From a8e32315e2453039385db95b867dd3182ad3fd67 Mon Sep 17 00:00:00 2001
From: Olivier BICHLER <olivier.bichler@cea.fr>
Date: Thu, 24 Aug 2023 18:09:47 +0200
Subject: [PATCH] Added test reports

---
 .gitlab/ci/test.gitlab-ci.yml | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/.gitlab/ci/test.gitlab-ci.yml b/.gitlab/ci/test.gitlab-ci.yml
index 31e4d3f71..be6773be1 100644
--- a/.gitlab/ci/test.gitlab-ci.yml
+++ b/.gitlab/ci/test.gitlab-ci.yml
@@ -5,7 +5,10 @@ test:ubuntu_cpp:
     - docker
   script:
     - cd build_cpp
-    - ctest --output-on-failure
+    - ctest --output-junit ctest-results.xml --output-on-failure
+  artifacts:
+    reports:
+      junit: ctest-results.xml
 
 test:ubuntu_python:
   stage: test
@@ -15,7 +18,10 @@ test:ubuntu_python:
   script:
     - source venv/bin/activate
     - cd aidge_core
+    - python3 -m pip install unittest-xml-reporting
     - python3 -m pip list
-    # Run on discovery all tests located in core/unit_tests/python and discard the stdout 
-    # only to show the errors/warnings and the results of the tests
-    - python3 -m unittest discover -s unit_tests/ -v -b 1> /dev/null
+    # Run on discovery all tests located in core/unit_tests/python
+    - python3 -m xmlrunner discover -s unit_tests/ -v -b --output-file xmlrunner-results.xml
+  artifacts:
+    reports:
+      junit: xmlrunner-results.xml
-- 
GitLab