Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix coverage calculation with jacoco #774

Merged
merged 1 commit into from
Jun 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/snapshot-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:

# Keeping these separate in case multiple builds are needed.
- name: Build
run: mvn clean deploy -DskipRemoteStaging=true -Prelease
run: mvn clean deploy -DskipRemoteStaging=true -Prelease,jacoco-report
env:
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.SONATYPE_PASSWORD }}
Expand All @@ -69,5 +69,4 @@ jobs:
- name: Upload CodeCov
uses: codecov/codecov-action@v3
with:
file: ./target/site/jacoco/jacoco.xml
flags: unittests
5 changes: 2 additions & 3 deletions .github/workflows/verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup JDK
uses: actions/setup-java@v3
Expand All @@ -40,10 +40,9 @@ jobs:
cache: maven

- name: Build & Test with Maven
run: mvn -U clean verify
run: mvn -U clean verify -Pjacoco-report

- name: Upload CodeCov
uses: codecov/codecov-action@v3
with:
file: ./target/site/jacoco/jacoco.xml
flags: unittests
33 changes: 25 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -429,14 +429,6 @@
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.8</version>
<executions>
<execution>
<id>default-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Maven PMD Plugin -->
<plugin>
Expand Down Expand Up @@ -818,6 +810,31 @@
</plugins>
</build>
</profile>
<profile>
<id>jacoco-report</id>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>autoInstallPackage-all</id>
<modules>
Expand Down