diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 517012fa3878802a907f932ee7a68b1e419f2eea..cc4832b7dde515af24a582777577a085e6d67e32 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,6 +6,7 @@ stages: variables: GRADLE_OPTS: "-Dorg.gradle.daemon=false" TEST_REPORTS: "/builds/rschoene/eraser/eraser-base/build/reports/tests/test/" + JACOCO_REPORT: "/builds/rschoene/eraser/eraser-base/build/reports/jacoco/test/jacocoTestReport.xml" before_script: - export GRADLE_USER_HOME=`pwd`/.gradle @@ -37,6 +38,7 @@ test: when: always paths: - $TEST_REPORTS + - $JACOCO_REPORT coverage: image: python:3.7.1-alpine @@ -55,3 +57,7 @@ coverage: - build - .gradle allow_failure: true + artifacts: + when: always + paths: + - $JACOCO_REPORT diff --git a/print-coverage.py b/print-coverage.py index 6b8e790a712c58af7eaf067975245dc1cc2a70b9..5ce5edaac9098c9c5e612df1a1606553deaff783 100644 --- a/print-coverage.py +++ b/print-coverage.py @@ -1,4 +1,6 @@ +import os import untangle +print('Current path: * + os.path.abspath(os.curdir)) obj = untangle.parse('eraser-base/build/reports/jacoco/test/jacocoTestReport.xml') instructions = [o for o in obj.report.counter if o['type'] == 'INSTRUCTION'][0] missed, covered = int(instructions['missed']), int(instructions['covered'])