jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/384091 )
Change subject: add JaCoCo test coverage reports
......................................................................
add JaCoCo test coverage reports
Change-Id: I9f9f02c81ba675b1a60c11acc9316925fbacb8e7
---
M README
M pom.xml
2 files changed, 63 insertions(+), 1 deletion(-)
Approvals:
jenkins-bot: Verified
DCausse: Looks good to me, approved
diff --git a/README b/README
index 084e0bd..89fde31 100644
--- a/README
+++ b/README
@@ -141,6 +141,13 @@
</plugin>
```
+### jacoco-maven-plugin
+
+Calculates the coverage of unit tests. Coverage of integration tests is not
+tracked as usually this isn't a metric which makes much sense. It is possible
+to make the build fail if a minimal coverage is not met, but this isn't active
+at the moment. Feel free to enable such check in your child project.
+
#### git-commit-id-plugin
Create a git.properties file containing information on the current git commit.
diff --git a/pom.xml b/pom.xml
index 789da21..6f8ce3f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -360,7 +360,7 @@
<requireMavenVersion>
<version>3.3.1</version>
</requireMavenVersion>
- <NoPackageCyclesRule
implementation="de.andrena.tools.nopackagecycles.NoPackageCyclesRule" />
+ <NoPackageCyclesRule
implementation="de.andrena.tools.nopackagecycles.NoPackageCyclesRule"></NoPackageCyclesRule>
</rules>
</configuration>
<dependencies>
@@ -497,6 +497,49 @@
<version>2.4</version>
</plugin>
<plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <version>0.7.9</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>
+ <phase>prepare-package</phase>
+ </execution>
+ <!--
+ Don't fail the build just yet
+ <execution>
+ <id>default-check</id>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <rule>
+ <element>BUNDLE</element>
+ <limits>
+ <limit>
+ <counter>COMPLEXITY</counter>
+ <value>COVEREDRATIO</value>
+ <minimum>0.60</minimum>
+ </limit>
+ </limits>
+ </rule>
+ </rules>
+ </configuration>
+ </execution>
+ -->
+ </executions>
+ </plugin>
+ <plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
@@ -624,6 +667,18 @@
</reportSet>
</reportSets>
</plugin>
+ <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>
--
To view, visit https://gerrit.wikimedia.org/r/384091
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I9f9f02c81ba675b1a60c11acc9316925fbacb8e7
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/discovery-parent-pom
Gerrit-Branch: master
Gerrit-Owner: Gehel <[email protected]>
Gerrit-Reviewer: DCausse <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits