Skip to content
Snippets Groups Projects

CI coverage

Merged
Otto Visserrequested to merge
CIcoverage into development
All threads resolved!
+ 25
1
@@ -126,9 +126,10 @@ gradle_test:
expire_in: 6 hours
paths:
- codecov/
- build/reports/jacoco/test/jacocoTestReport.xml
reports:
junit: build/test-results/test/TEST-*.xml
cobertura: build/reports/jacoco/test/jacocoTestReport.xml
#cobertura: build/reports/jacoco/test/jacocoTestReport.xml
script:
- gradle --build-cache test
after_script:
@@ -277,6 +278,29 @@ include:
# - when: never
# script: echo Oops
coverage:
image: haynes/jacoco2cobertura:1.0.4
extends:
- .gitlab_reporter
rules:
- if: $CI_PIPELINE_SOURCE == "trigger"
when: never
- if: $CI_COMMIT_BRANCH == "master" ||
$CI_COMMIT_BRANCH == "development" ||
$CI_MERGE_REQUEST_ID ||
$CI_PIPELINE_SOURCE == "push"
script:
# convert report from jacoco to cobertura
- 'python /opt/cover2cover.py build/reports/jacoco/test/jacocoTestReport.xml src/main/java > build/cobertura.xml'
# read the <source></source> tag and prepend the path to every filename attribute
- 'python /opt/source2filename.py build/cobertura.xml'
needs:
- gradle_test
dependencies:
- gradle_test
artifacts:
reports:
cobertura: build/cobertura.xml
# Runs the code quality reporter
code_quality:
Loading