From 360df2054cdc5a8bc194f7701b2bfa5a9c39dd0d Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 10 Dec 2020 09:35:01 +0100 Subject: first test with code-coverage in CI pipe --- .gitlab-ci.yml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ef026155..9ec05060 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,6 +18,7 @@ include: stages: - assemble + - visualize - test - package - release @@ -36,7 +37,27 @@ assemble: when: always reports: junit: "**/target/surefire-reports/TEST-*.xml" - + paths: + - build_reporting/target/site/jacoco-aggregate-ut/jacoco.xml + +coverage: + stage: visualize + image: haynes/jacoco2cobertura:1.0.4 + script: + - mkdir -p target/site + # convert report from jacoco to cobertura + - 'python /opt/cover2cover.py build_reporting/target/site/jacoco-aggregate-ut/jacoco.xml eaaf_core_api/src/main/java eaaf_core_utils/src/main/java eaaf_core/src/main/java eaaf_modules/eaaf_module_auth_sl20/src/main/java eaaf_modules/eaaf_module_moa-sig/src/main/java eaaf_modules/eaaf_module_pvp2_core/src/main/java eaaf_modules/eaaf_module_pvp2_idp/src/main/java eaaf_modules/eaaf_module_pvp2_sp/src/main/java > target/site/cobertura.xml' + # read the tag and prepend the path to every filename attribute + #- 'python /opt/source2filename.py target/site/cobertura.xml' + needs: + - job: assemble + dependencies: + - assemble + artifacts: + reports: + cobertura: target/site/cobertura.xml + + publishToGitlab: stage: package except: -- cgit v1.2.3