[DEV] update coverage display

This commit is contained in:
Edouard DUPIN 2020-08-28 21:04:11 +02:00
parent d231acb727
commit 6e8157f48e
2 changed files with 14 additions and 4 deletions

View File

@ -4,7 +4,8 @@ variables:
JAVA_TOOL_OPTIONS: "-Dfile.encoding=UTF8"
before_script:
- apk update && apk add python3 gawk
- apk update && apk add gawk
#- apk update && apk add python3 gawk
cache:
paths:
@ -36,8 +37,8 @@ test_job:
- build_job
script:
- mvn $MAVEN_CLI_OPTS test
- mkdir -p target/site/cobertura && /usr/bin/python3 ./cover2cover.py target/site/jacoco/jacoco.xml src/io/scenarium/logger/ > target/site/cobertura/coverage.xml
- awk -F, '{ instructions += $4 + $5; covered += $5 } END { print "===============================================\n== Coverage Results:\n==\n== ", covered, " / ", instructions, " instructions covered"; print "== ", 100*covered/instructions, "% covered\n==\n===============================================" }' target/site/jacoco/jacoco.csv
#- mkdir -p target/site/cobertura && /usr/bin/python3 ./cover2cover.py target/site/jacoco/jacoco.xml src/io/scenarium/logger/ > target/site/cobertura/coverage.xml
- awk -F, '{ instructions += $4 + $5; covered += $5 } END { print "===============================================\nCoverage Results:\n\n", covered, " / ", instructions, " instructions covered"; print "Total", 100*covered/instructions, "% covered\n==\n===============================================" }' target/site/jacoco/jacoco.csv
artifacts:
when: on_success
expire_in: 3 day
@ -45,7 +46,7 @@ test_job:
- target/site/jacoco
reports:
junit: target/surefire-reports/TEST-*.xml
cobertura: target/site/cobertura/coverage.xml
#cobertura: target/site/cobertura/coverage.xml
package_job:
stage: package

View File

@ -2,3 +2,12 @@ plugin manager
==============
[MPL-2] generic plugin interface for complex modular system
[![pipeline status](https://gitlab.com/scenarium/scenarium-logger/badges/master/pipeline.svg)](https://gitlab.com/scenarium/scenarium-logger/-/commits/master)
[![coverage report](https://gitlab.com/scenarium/scenarium-logger/badges/master/coverage.svg)](https://gitlab.com/scenarium/scenarium-logger/-/commits/master)