Commit ec80e014 authored by Tigran Mkrtchyan's avatar Tigran Mkrtchyan
Browse files

dcache-cta: split package and test steps

parent 78d36abd
...@@ -16,19 +16,28 @@ cache: ...@@ -16,19 +16,28 @@ cache:
paths: paths:
- ./.m2/repository - ./.m2/repository
build: package:
stage: build stage: build
image: maven:3.6.3-openjdk-11 image: maven:3.6.3-openjdk-11
script: script:
- mvn $MAVEN_CLI_OPTS clean org.jacoco:jacoco-maven-plugin:prepare-agent package jacoco:report - mvn $MAVEN_CLI_OPTS clean -DskipTests package
artifacts:
paths:
- "target/dcache-cta*.tar.gz"
test:
stage: build
image: maven:3.6.3-openjdk-11
script:
- mvn $MAVEN_CLI_OPTS clean org.jacoco:jacoco-maven-plugin:prepare-agent test jacoco:report
artifacts: artifacts:
reports: reports:
junit: junit:
- "**/target/surefire-reports/TEST-*.xml" - "target/surefire-reports/TEST-*.xml"
- "**/target/failsafe-reports/TEST-*.xml" - "target/failsafe-reports/TEST-*.xml"
paths: paths:
- "**/target/dcache-cta*.tar.gz" - "target/site/jacoco/jacoco.xml"
coverage-jdk11: coverage-jdk11:
# Must be in a stage later than test-jdk11's stage. # Must be in a stage later than test-jdk11's stage.
...@@ -39,7 +48,7 @@ coverage-jdk11: ...@@ -39,7 +48,7 @@ coverage-jdk11:
script: script:
# convert report from jacoco to cobertura, using relative project path # convert report from jacoco to cobertura, using relative project path
- python /opt/cover2cover.py target/site/jacoco/jacoco.xml $CI_PROJECT_DIR/src/main/java/ > target/site/cobertura.xml - python /opt/cover2cover.py target/site/jacoco/jacoco.xml $CI_PROJECT_DIR/src/main/java/ > target/site/cobertura.xml
needs: ["build"] needs: ["test"]
artifacts: artifacts:
reports: reports:
cobertura: target/site/cobertura.xml cobertura: target/site/cobertura.xml
\ No newline at end of file
Markdown is supported
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