diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9f83a45..6c4724a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 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: