Commit 24bf95b3 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

code coverage report in commons module

parent 6609675c
Pipeline #9299 failed with stage
in 4 minutes and 23 seconds
......@@ -21,6 +21,7 @@ test_frontend:
test_backend 1 15:
image: maven:3.6.0-jdk-8
stage: test
coverage: '/(\d+.\d+) \% covered/'
script:
#xvfb is for X11 connection used by some parts of the java code: https://stackoverflow.com/a/47575851/1127920
- apt-get update
......@@ -30,6 +31,7 @@ test_backend 1 15:
- mvn -DskipTests=true clean install -pl commons -am
- mvn test -pl commons
- awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' target/site/jacoco/jacoco.csv
test_backend 2 15:
image: maven:3.6.0-jdk-8
......
......@@ -173,6 +173,25 @@
<surefire.rerunFailingTestsCount>4</surefire.rerunFailingTestsCount>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.9</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>generate-code-coverage-report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
......
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