feat: Adds a coverage profile and configures Codecov. (#225)

This commit is contained in:
George Politis 2021-04-12 16:17:55 +01:00 committed by GitHub
parent f176d021f8
commit c829b3a766
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 1 deletions

View File

@ -41,7 +41,11 @@ jobs:
${{ runner.os }}-maven-
- name: Build and test with Maven
run: mvn -B -Dgpg.skip -Drelease=true verify
run: mvn -B -Dgpg.skip -Drelease=true -Pcoverage verify
- name: Upload coverage report
if: matrix.java == env.RELEASE_JAVA_VERSION
uses: codecov/codecov-action@v1
release:
if: github.ref == 'refs/heads/master'

26
pom.xml
View File

@ -287,6 +287,32 @@
</build>
<profiles>
<profile>
<id>coverage</id>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.6</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>run-sample</id>
<build>