Skip to content
Snippets Groups Projects
Commit b3be4824 authored by Daniel Gerhardt's avatar Daniel Gerhardt
Browse files

Extract code coverage from Jacoco for GitLab

parent 062291f4
1 merge request!155Extract code coverage from Jacoco for GitLab
Pipeline #30194 passed with warnings with stages
in 2 minutes and 45 seconds
......@@ -49,8 +49,10 @@ unit_test:
paths:
- $OUTPUT_DIR
cache: *maven_cache
coverage: '/Code coverage: \d+\.\d+/'
script:
- mvn -B jacoco:prepare-agent surefire:test jacoco:report
- awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print "Instructions covered:", covered, "/", instructions; print "Code coverage:", 100 * covered / instructions "%" }' "$OUTPUT_DIR/site/jacoco/jacoco.csv"
package:
stage: post-build
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment