From 05507a21a1d8d15747c8877c2271e77f3e33897c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rajmund=20Hru=C5=A1ka?= <rajmund.hruska@gmail.com>
Date: Wed, 1 Jun 2022 16:01:07 +0200
Subject: [PATCH] CI/CD: Save test result in JUnit report XML format.

---
 .gitlab-ci.yml | 6 +++++-
 Makefile       | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f1723d7..1d41e52 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -33,6 +33,10 @@ unit-test-job:
   stage: test
   script:
     - make test
+  artifacts:
+    when: always
+    reports:
+      junit: nosetests.xml
 
 pylint-test-job:
   stage: test
@@ -105,4 +109,4 @@ pages:
       - public
   only:
     - master
-    - devel
\ No newline at end of file
+    - devel
diff --git a/Makefile b/Makefile
index 6a37ddc..54ccd00 100644
--- a/Makefile
+++ b/Makefile
@@ -158,7 +158,7 @@ pylint-test: FORCE
 
 test: FORCE
 	@echo "\n${GREEN}*** Checking code with nosetests ***${NC}\n"
-	@nosetests test_idea.py
+	@nosetests test_idea.py --with-xunit
 
 
 #-------------------------------------------------------------------------------
-- 
GitLab