You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2018/01/09 14:48:53 UTC
[incubator-plc4x] branch master updated: Enable coverage checks
(Report warnings but don't break the build for now)
This is an automated email from the ASF dual-hosted git repository.
cdutz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git
The following commit(s) were added to refs/heads/master by this push:
new 25a752c Enable coverage checks (Report warnings but don't break the build for now)
25a752c is described below
commit 25a752ce34b2fb464c01515988790fb1bf19f515
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Tue Jan 9 09:40:04 2018 +0100
Enable coverage checks (Report warnings but don't break the build for now)
---
plc4j/pom.xml | 31 -------------------------------
pom.xml | 36 +++++++++++++++++++++++++++++++++++-
2 files changed, 35 insertions(+), 32 deletions(-)
diff --git a/plc4j/pom.xml b/plc4j/pom.xml
index 9f607cf..b4dd01d 100644
--- a/plc4j/pom.xml
+++ b/plc4j/pom.xml
@@ -69,37 +69,6 @@
<version>2.13.0</version>
<scope>test</scope>
</dependency>
-
</dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.jacoco</groupId>
- <artifactId>jacoco-maven-plugin</artifactId>
- <configuration>
- <rules>
- <rule implementation="org.jacoco.maven.RuleConfiguration">
- <element>BUNDLE</element>
- <limits>
- <!-- Fail the build if the instruction level coverage is below 80%. -->
- <limit implementation="org.jacoco.report.check.Limit">
- <counter>INSTRUCTION</counter>
- <value>COVEREDRATIO</value>
- <minimum>0.80</minimum>
- </limit>
- <!-- Fail the build if there are classes without any coverage. -->
- <limit implementation="org.jacoco.report.check.Limit">
- <counter>CLASS</counter>
- <value>MISSEDCOUNT</value>
- <maximum>0</maximum>
- </limit>
- </limits>
- </rule>
- </rules>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
</project>
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index d04ae35..25e7f8c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -716,7 +716,7 @@
<executions>
<execution>
<id>generate-effective-pom</id>
- <phase>pre-site</phase>
+ <phase>compile</phase>
<goals>
<goal>effective-pom</goal>
</goals>
@@ -800,6 +800,40 @@
<destFile>${sonar.jacoco.itReportPath}</destFile>
</configuration>
</execution>
+ <!--
+ Check if the unit-test-coverage is at least a certain minimum.
+ -->
+ <execution>
+ <id>check-coverage</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ <configuration>
+ <!-- TODO: Turn this on as soon as possible. -->
+ <haltOnFailure>false</haltOnFailure>
+ <dataFile>${sonar.jacoco.reportPath}</dataFile>
+ <rules>
+ <rule implementation="org.jacoco.maven.RuleConfiguration">
+ <element>BUNDLE</element>
+ <limits>
+ <!-- Fail the build if the instruction level coverage is below 80%. -->
+ <limit implementation="org.jacoco.report.check.Limit">
+ <counter>INSTRUCTION</counter>
+ <value>COVEREDRATIO</value>
+ <minimum>0.50</minimum>
+ </limit>
+ <!-- Fail the build if there are classes without any coverage. -->
+ <limit implementation="org.jacoco.report.check.Limit">
+ <counter>CLASS</counter>
+ <value>MISSEDCOUNT</value>
+ <maximum>0</maximum>
+ </limit>
+ </limits>
+ </rule>
+ </rules>
+ </configuration>
+ </execution>
</executions>
</plugin>
--
To stop receiving notification emails like this one, please contact
['"commits@plc4x.apache.org" <co...@plc4x.apache.org>'].