Skip to content

Commit

Permalink
ci: enable code coverage with jacoco and coveralls
Browse files Browse the repository at this point in the history
  • Loading branch information
danglotb committed Jun 21, 2021
1 parent 4672b2f commit 003125c
Show file tree
Hide file tree
Showing 19 changed files with 48 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/mvn-build-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
run: export MAVEN_HOME=`mvn --version | grep 'Maven home' | sed -e 's/Maven h.* //'` && echo "🎉 ${MAVEN_HOME} "
- name: Prepare resources binaries
run: ./src/compile-and-clean-test-projects.sh
- name: Test with Maven
run: mvn test
- name: Test and Coverage with Maven
run: mvn test jacoco:report coveralls:report
env:
github-token: ${{ secrets.GITHUB_TOKEN }}

44 changes: 44 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,55 @@
</dependencies>
</plugin>

<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.5.201505241946</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>

</plugins>

<pluginManagement>
<plugins>
<plugin>
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
<version>4.3.0</version>
</plugin>
</plugins>
</pluginManagement>

</build>



<profiles>
<profile>
<id>coveralls</id>
<build>
<plugins>
<plugin>
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
<version>4.3.0</version>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>release</id>
<build>
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 003125c

Please sign in to comment.