Skip to content

Commit 2c21b6e

Browse files
committed
Adding JaCoCo coverage.
1 parent 57096eb commit 2c21b6e

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

.github/workflows/maven.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ jobs:
3030
env:
3131
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3232
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
33-
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=jwcarman_adventofcode2024
33+
run: mvn -Pci -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=jwcarman_adventofcode2024

pom.xml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
<kotlin.version>2.1.0</kotlin.version>
3333

3434
<assertj.version>3.26.3</assertj.version>
35+
<jacoco.version>0.8.12</jacoco.version>
3536
<junit.version>5.11.3</junit.version>
3637
<kotest.version>5.9.1</kotest.version>
3738

@@ -132,4 +133,38 @@
132133
</dependency>
133134
</dependencies>
134135

136+
<profiles>
137+
<profile>
138+
<id>ci</id>
139+
<build>
140+
<plugins>
141+
<plugin>
142+
<groupId>org.jacoco</groupId>
143+
<artifactId>jacoco-maven-plugin</artifactId>
144+
<version>${jacoco.version}</version>
145+
<executions>
146+
<execution>
147+
<id>prepare-agent</id>
148+
<goals>
149+
<goal>prepare-agent</goal>
150+
</goals>
151+
</execution>
152+
<execution>
153+
<id>report</id>
154+
<goals>
155+
<goal>report</goal>
156+
</goals>
157+
<configuration>
158+
<formats>
159+
<format>XML</format>
160+
</formats>
161+
</configuration>
162+
</execution>
163+
</executions>
164+
</plugin>
165+
</plugins>
166+
</build>
167+
</profile>
168+
</profiles>
169+
135170
</project>

0 commit comments

Comments
 (0)