From 3cf36dae27e9331d8e98cf6c9d8ff3c1166d6f79 Mon Sep 17 00:00:00 2001 From: Colin DAMON <cdamon@ippon.fr> Date: Sun, 26 Jul 2020 16:48:16 +0200 Subject: [PATCH] Use branch coverage --- .gitlab-common-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-common-ci.yml b/.gitlab-common-ci.yml index 1edcbf29..79ea79eb 100644 --- a/.gitlab-common-ci.yml +++ b/.gitlab-common-ci.yml @@ -19,6 +19,7 @@ cache: script: - mvn $MAVEN_CLI_OPTS clean package - cat target/site/jacoco/index.html + - awk -F"," '{ branches += $6 + $7; covered += $7 } END { print covered, "/", branches, "branches covered"; print 100*covered/branches, "%covered" }' target/site/jacoco/jacoco.csv artifacts: reports: junit: $PROJECT_FOLDER/target/surefire-reports/TEST-*.xml @@ -33,4 +34,4 @@ cache: - ".gitlab-ci.yml" - ".gitlab-common-ci.yml" - "$PROJECT_FOLDER/**/*" - coverage: '/Total.*?([0-9]{1,3})%/' + coverage: '/([^%]+) %covered/' -- GitLab