Skip to content

Commit f37640f

Browse files
authored
Switch to jacoco from cobertura
1 parent 47c0523 commit f37640f

File tree

2 files changed

+25
-12
lines changed

2 files changed

+25
-12
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,14 @@ jobs:
147147
tar xf /tmp/apache-maven-3.6.3-bin.tar.gz -C /opt
148148
echo "${M2_HOME}/bin" >> $GITHUB_PATH
149149
150-
- name: Run cobertura
150+
- name: Run jacoco report
151151
shell: bash
152152
run: |
153-
mvn cobertura:cobertura -Dcobertura.report.format=xml -B
153+
mvn jacoco:prepare-agent test jacoco:report -B
154154
155155
# Generating test coverage report and publishing to Codacy
156156
- name: Run report coverage
157157
uses: codacy/codacy-coverage-reporter-action@v1
158158
with:
159159
project-token: 4f71427f28dc44a7b762bb14f21094ea
160-
coverage-reports: target/site/cobertura/coverage.xml
160+
coverage-reports: target/site/jacoco/jacoco.xml

pom.xml

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,18 @@
4242
</reportSet>
4343
</reportSets>
4444
</plugin>
45+
<plugin>
46+
<groupId>org.jacoco</groupId>
47+
<artifactId>jacoco-maven-plugin</artifactId>
48+
<version>0.8.11</version>
49+
<reportSets>
50+
<reportSet>
51+
<reports>
52+
<report>report</report>
53+
</reports>
54+
</reportSet>
55+
</reportSets>
56+
</plugin>
4557
</plugins>
4658
</reporting>
4759

@@ -290,15 +302,16 @@
290302
</configuration>
291303
</plugin>
292304
<plugin>
293-
<groupId>org.codehaus.mojo</groupId>
294-
<artifactId>cobertura-maven-plugin</artifactId>
295-
<version>2.7</version>
296-
<configuration>
297-
<formats>
298-
<format>html</format>
299-
<format>xml</format>
300-
</formats>
301-
</configuration>
305+
<groupId>org.jacoco</groupId>
306+
<artifactId>jacoco-maven-plugin</artifactId>
307+
<version>0.8.11</version>
308+
<executions>
309+
<execution>
310+
<goals>
311+
<goal>prepare-agent</goal>
312+
</goals>
313+
</execution>
314+
</executions>
302315
</plugin>
303316
</plugins>
304317
</build>

0 commit comments

Comments
 (0)