From 5354a6e40eaea1c72b80ade2251cf723f3fb7c6f Mon Sep 17 00:00:00 2001
From: Michal Badin <xbadin@fi.muni.cz>
Date: Wed, 3 May 2023 23:49:36 +0200
Subject: [PATCH] feat(CI/DC): Spited tests into unit test substage and
 integration test substage

---
 .gitlab-ci.yml | 30 ++++++++++++++++++++++++++----
 1 file changed, 26 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1f33738..cb282f6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -14,14 +14,36 @@ default:
 
 stages:
   - build
-  - test
+  - tests
 
 build:
   stage: build
   script:
+    - echo "We are building your project"
     - mvn clean install $MAVEN_CLI_OPTS -DskipTests
 
-test:
-  stage: test
+unit_test:
+  stage: tests
   script:
-    - mvn test $MAVEN_CLI_OPTS
\ No newline at end of file
+    - echo "We are testing your project build with unit tests"
+    - mvn test $MAVEN_CLI_OPTS
+  artifacts:
+    expire_in: 10 min
+    paths:
+      - "*/target/surefire-reports/*"
+    reports:
+      junit:
+        - "*/target/surefire-reports/*.xml"
+
+integration_test:
+  stage: tests
+  script:
+    - echo "We are testing your project build with integration tests"
+    - mvn verify $MAVEN_CLI_OPTS
+  artifacts:
+    expire_in: 10 min
+    paths:
+      - "*/target/failsafe-reports/*"
+    reports:
+      junit:
+        - "*/target/failsafe-reports/*.xml"
-- 
GitLab