Skip to content

Commit c59e2f6

Browse files
dfa1claude
andcommitted
ci: include failsafe coverage in Sonar
Add report-integration JaCoCo execution (writes jacoco-it.xml) and set sonar.coverage.jacoco.xmlReportPaths to both jacoco.xml and jacoco-it.xml so integration-test coverage is sent to SonarCloud. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent a954729 commit c59e2f6

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

pom.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@
8181
**/fbs/**,
8282
**/proto/**
8383
</sonar.coverage.exclusions>
84+
<!-- Both surefire (jacoco.xml) and failsafe (jacoco-it.xml) reports sent to Sonar.
85+
The failsafe report is produced by the report-integration execution in the coverage profile. -->
86+
<sonar.coverage.jacoco.xmlReportPaths>
87+
${project.build.directory}/site/jacoco/jacoco.xml,
88+
${project.build.directory}/site/jacoco-it/jacoco.xml
89+
</sonar.coverage.jacoco.xmlReportPaths>
8490
<!-- Default for the {@code @{argLine}} placeholder in surefire/failsafe configs. JaCoCo's
8591
{@code prepare-agent} goal overwrites this with the agent arguments when active; if
8692
the {@code coverage} profile is not enabled the empty default ensures surefire
@@ -387,6 +393,13 @@
387393
<goal>report</goal>
388394
</goals>
389395
</execution>
396+
<execution>
397+
<id>report-integration</id>
398+
<phase>post-integration-test</phase>
399+
<goals>
400+
<goal>report-integration</goal>
401+
</goals>
402+
</execution>
390403
</executions>
391404
</plugin>
392405
</plugins>

0 commit comments

Comments
 (0)