Merge pull request 'Generate Code Coverage Report for Jenkins' (#7) from f/coverage into develop
All checks were successful
zdm/undo-redo/pipeline/head This commit looks good

Reviewed-on: https://git.kske.dev/zdm/undo-redo/pulls/7
Reviewed-by: delvh <leon@kske.dev>
This commit is contained in:
Kai S. K. Engelbart 2021-12-24 14:37:58 +01:00
commit 9c2971a078
Signed by: Käfer & Engelbart Git
GPG Key ID: 70F2F9206EDC1FCE
2 changed files with 24 additions and 3 deletions

1
Jenkinsfile vendored
View File

@ -18,6 +18,7 @@ pipeline {
post { post {
always { always {
junit '*/target/surefire-reports/*.xml' junit '*/target/surefire-reports/*.xml'
publishCoverage adapters: [jacocoAdapter(mergeToOneReport: true, path: '*/target/site/jacoco/jacoco.xml')]
} }
} }
} }

24
pom.xml
View File

@ -182,11 +182,31 @@
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version> <version>3.0.0-M5</version>
<configuration> <configuration>
<argLine>--add-opens dev.kske.undoredo.core/dev.kske.undoredo.core=ALL-UNNAMED</argLine> <argLine>${argLine} --add-opens dev.kske.undoredo.core/dev.kske.undoredo.core=ALL-UNNAMED</argLine>
</configuration> </configuration>
</plugin> </plugin>
<!-- Generate coverage report -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.7</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins> </plugins>
</build> </build>
</project> </project>