Skip to content

Commit

Permalink
enable coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas committed Mar 27, 2020
1 parent cf610bb commit 35ba8de
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 6 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@

name: Java CI with Maven

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
on: ["push", "pull_request"]

jobs:
build:
Expand All @@ -27,4 +23,6 @@ jobs:
with:
mongodb-version: ${{ matrix.mongodb-version }}
- name: Build with Maven
run: mvn -B package --file pom.xml
run: mvn -B clean package jacoco:report coveralls:report --file pom.xml
env:
COVERALLS_TOKEN: ${{ secrets.coverallsToken }}
43 changes: 43 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,50 @@
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.5</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
<version>4.3.0</version>
<configuration>
<repoToken>${COVERALLS_TOKEN}</repoToken>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<reportSets>
<reportSet>
<reports>
<!-- select non-aggregate reports -->
<report>report</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>

</project>

0 comments on commit 35ba8de

Please sign in to comment.