Merge branch 'chore/ci-execute-junit-tests' into 'main'

Add CI job to run unit tests on push and MR

See merge request cs108-fs26/Gruppe-13!21
This commit was merged in pull request #177.
This commit is contained in:
Lars Simon Winzer
2026-03-14 10:12:48 +01:00
+21
View File
@@ -2,6 +2,7 @@ stages:
- lint
- report
- build
- test
# Reusable definitions
.gradle-cache: &gradle-cache
@@ -87,3 +88,23 @@ compile-check:
allow_failure: false
- if: '$CI_COMMIT_BRANCH'
allow_failure: false
test:
<<: *gradle-cache
stage: test
image: gradle:9.3.1-jdk25
script:
- gradle test
artifacts:
when: always
reports:
junit: build/test-results/test/*.xml
paths:
- build/reports/tests/test/
expose_as: 'Test Report'
expire_in: 1 week
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
allow_failure: false
- if: '$CI_COMMIT_BRANCH'
allow_failure: true