Added jacoco and codecov to the build process.

This commit is contained in:
hneemann 2018-06-01 21:38:26 +02:00
parent 92c32ac118
commit 9c781d0731
2 changed files with 46 additions and 6 deletions

View File

@ -2,7 +2,11 @@ language: java
jdk:
- oraclejdk8
sudo: false
script: mvn clean install
script:
- "mvn clean install"
- "mvn jacoco:report -Dcode-coverage-format=xml"
after_success:
- bash <(curl -s https://codecov.io/bash)
deploy:
provider: releases
api_key:

46
pom.xml
View File

@ -26,11 +26,6 @@
<reporting>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.7</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
@ -222,6 +217,47 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.1</version>
<executions>
<execution>
<id>default-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>default-report</id>
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>default-check</id>
<goals>
<goal>check</goal>
</goals>
<configuration>
<rules>
<!-- implementation is needed only for Maven 2 -->
<rule implementation="org.jacoco.maven.RuleConfiguration">
<element>BUNDLE</element>
<limits>
<!-- implementation is needed only for Maven 2 -->
<limit implementation="org.jacoco.report.check.Limit">
<counter>COMPLEXITY</counter>
<value>COVEREDRATIO</value>
<minimum>0.50</minimum>
</limit>
</limits>
</rule>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>