Skip to content

Commit cb523b6

Browse files
committed
make it works
1 parent e7f6116 commit cb523b6

File tree

2 files changed

+28
-32
lines changed

2 files changed

+28
-32
lines changed

.github/workflows/coverage.yaml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,14 @@ jobs:
3434
run: mvn test jacoco:prepare-agent
3535

3636
- name: Generate Jacoco coverage report
37-
run: mvn jacoco:report -DreportOutputDirectory=${{ github.workspace }}/target/site/jacoco
37+
run: mvn jacoco:report
3838

39-
- name: show files
40-
run: |
41-
ls
42-
pwd
4339
- name: Upload coverage report
4440
uses: actions/upload-artifact@v4
4541
with:
4642
name: coverage-report
4743
path: |
48-
${{ github.workspace }}/target/site/jacoco/jacoco.xml
49-
${{ github.workspace }}/target/site/jacoco/index.html
44+
${{ github.workspace }}/sdk/target/site/jacoco/jacoco.xml
45+
${{ github.workspace }}/sdk/target/site/jacoco/index.html
5046
5147

pom.xml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,9 @@
131131
<version>3.8.0</version>
132132
</plugin>
133133
<plugin>
134+
<groupId>org.apache.maven.plugins</groupId>
134135
<artifactId>maven-surefire-plugin</artifactId>
135-
<version>3.0.0</version>
136+
<version>3.2.5</version>
136137
</plugin>
137138
<plugin>
138139
<artifactId>maven-jar-plugin</artifactId>
@@ -172,30 +173,7 @@
172173
<plugin>
173174
<groupId>org.jacoco</groupId>
174175
<artifactId>jacoco-maven-plugin</artifactId>
175-
<version>0.8.8</version>
176-
<executions>
177-
<execution>
178-
<goals>
179-
<goal>prepare-agent</goal>
180-
</goals>
181-
<configuration>
182-
<destFile>${project.build.directory}/jacoco.exec</destFile>
183-
</configuration>
184-
</execution>
185-
<execution>
186-
<id>report</id>
187-
<phase>test</phase>
188-
<goals>
189-
<goal>report</goal>
190-
</goals>
191-
<configuration>
192-
<outputDirectory>${project.build.directory}/site/jacoco</outputDirectory>
193-
<formats>
194-
<format>xml</format>
195-
</formats>
196-
</configuration>
197-
</execution>
198-
</executions>
176+
<version>0.8.12</version>
199177
</plugin>
200178
</plugins>
201179
</pluginManagement>
@@ -239,6 +217,28 @@
239217
</execution>
240218
</executions>
241219
</plugin>
220+
<plugin>
221+
<groupId>org.jacoco</groupId>
222+
<artifactId>jacoco-maven-plugin</artifactId>
223+
<executions>
224+
<execution>
225+
<goals>
226+
<goal>prepare-agent</goal>
227+
<goal>report</goal>
228+
</goals>
229+
<configuration>
230+
<outputDirectory>${project.basedir}/coverage-report</outputDirectory>
231+
</configuration>
232+
</execution>
233+
<execution>
234+
<id>generate-code-coverage-report</id>
235+
<phase>test</phase>
236+
<goals>
237+
<goal>report</goal>
238+
</goals>
239+
</execution>
240+
</executions>
241+
</plugin>
242242
</plugins>
243243
</build>
244244
<profiles>

0 commit comments

Comments
 (0)