Fix gitlab-ci paths

This commit is contained in:
Oystein Kristoffer Tveit 2021-09-06 00:44:24 +02:00
parent 59527db7dd
commit 8bd35273db

View File

@ -45,10 +45,11 @@ stages:
build:
stage: build
script:
- "cd oysteikt-calc"
- "mvn clean compile $MAVEN_CLI_OPTS"
artifacts:
paths:
- target/
- oysteikt-calc/target/
unittest:
stage: test
@ -56,39 +57,42 @@ unittest:
script:
- "apt update"
- "apt install -y openjfx"
- "cd oysteikt-calc"
- "mvn package $MAVEN_CLI_OPTS"
artifacts:
paths:
- target/
- oysteikt-calc/target/
when: always
reports:
junit:
- target/surefire-reports/TEST-*.xml
- oysteikt-calc/target/surefire-reports/TEST-*.xml
generate-coverage:
stage: docs
script:
- "apt update"
- "apt install -y openjfx"
- "cd oysteikt-calc"
- 'mvn clean jacoco:prepare-agent test $MAVEN_CLI_OPTS jacoco:report'
- 'cat target/site/jacoco/index.html'
coverage: '/Total.*?([0-9]{1,3})%/'
artifacts:
paths:
- target/site/jacoco
- oysteikt-calc/target/site/jacoco
process-coverage:
stage: postprocessing
image: haynes/jacoco2cobertura:1.0.4
needs: [generate-coverage]
script:
- "cd oysteikt-calc"
# convert report from jacoco to cobertura
- 'python /opt/cover2cover.py target/site/jacoco/jacoco.xml src/main/java > target/site/cobertura.xml'
# read the <source></source> tag and prepend the path to every filename attribute
- 'python /opt/source2filename.py target/site/cobertura.xml'
artifacts:
reports:
cobertura: target/site/cobertura.xml
cobertura: oysteikt-calc/target/site/cobertura.xml
# generate-apidocs:
# stage: docs
@ -103,7 +107,7 @@ pages:
# needs: [generate-coverage, generate-apidocs]
needs: [generate-coverage]
script:
- mv target/site/jacoco public/
- mv oysteikt-calc/target/site/jacoco public/
# - mv target/site/apidocs public/
artifacts:
paths: