Changed coverage to Jacoco
All checks were successful
spigotresourcesync/pipeline/head This commit looks good

This commit is contained in:
Harrison Deng 2024-11-14 03:24:41 +00:00
parent 7e2c68bad8
commit 4bb1cd7277
2 changed files with 21 additions and 1 deletions

2
Jenkinsfile vendored
View File

@ -16,7 +16,7 @@ pipeline {
steps {
sh "mvn test"
xunit checksName: '', tools: [JUnit(excludesPattern: '', pattern: 'target/surefire-reports/TEST-*.xml', stopProcessingIfError: true)]
recordCoverage(tools: [[parser: 'JUNIT', pattern: 'target/surefire-reports/TEST-*.xml']])
recordCoverage(tools: [[pattern: 'target/site/jacoco/jacoco.xml']])
}
}
stage("deploy") {

20
pom.xml
View File

@ -65,6 +65,26 @@
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.5.2</version>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.11</version>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>