Skip to content

Commit

Permalink
Bind Jacoco to default verify phase and also use this in the coverage…
Browse files Browse the repository at this point in the history
… GHA job.
  • Loading branch information
jonashackt committed Feb 15, 2021
1 parent d8562f3 commit 1d367aa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- uses: actions/setup-java@v1
with:
java-version: 15
- run: mvn -B test -P coverage --no-transfer-progress
- run: mvn -B verify -P coverage --no-transfer-progress

- uses: codecov/codecov-action@v1
with:
Expand Down
13 changes: 5 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -164,20 +164,17 @@
<artifactId>jacoco-maven-plugin</artifactId>
<version>${build-plugin.jacoco.version}</version>
<executions>
<!-- Prepares the property pointing to the JaCoCo
runtime agent which is passed as VM argument when Maven the Surefire plugin
is executed. -->
<!-- Prepares the property pointing to the JaCoCo runtime agent
which is passed as VM argument when Maven the Surefire plugin is executed. -->
<execution>
<id>pre-unit-test</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<!-- Ensures that the code coverage report for
unit tests is created after unit tests have been run. -->
<!-- Ensures that the code coverage report is created after
all tests have been run. -->
<execution>
<id>post-unit-test</id>
<phase>test</phase>
<id>generate-report</id>
<goals>
<goal>report</goal>
</goals>
Expand Down

0 comments on commit 1d367aa

Please sign in to comment.