forked from loafle/openapi-generator-original
Adds jacoco for code coverage (#5084)
* Adds jacoco for code coverage This sets up jacoco instrumentation for code coverage. Preparing for master and PR coverage reporting via sonarcloud. * Set initial required coverage to 0
This commit is contained in:
parent
327ffc10bb
commit
09fd494836
59
pom.xml
59
pom.xml
@ -150,6 +150,52 @@
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>-->
|
||||
<!-- https://www.jacoco.org/jacoco/trunk/doc/maven.html -->
|
||||
<plugin>
|
||||
<groupId>org.jacoco</groupId>
|
||||
<artifactId>jacoco-maven-plugin</artifactId>
|
||||
<version>${jacoco.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>jacoco-initialize</id>
|
||||
<goals>
|
||||
<goal>prepare-agent</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>jacoco-site</id>
|
||||
<phase>test</phase>
|
||||
<goals>
|
||||
<goal>report</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>default-check</id>
|
||||
<goals>
|
||||
<goal>check</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<rules>
|
||||
<rule>
|
||||
<element>PACKAGE</element>
|
||||
<limits>
|
||||
<limit>
|
||||
<counter>LINE</counter>
|
||||
<value>COVEREDRATIO</value>
|
||||
<minimum>0</minimum>
|
||||
</limit>
|
||||
</limits>
|
||||
</rule>
|
||||
</rules>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>**/gradle-wrapper.jar</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
@ -159,8 +205,18 @@
|
||||
<useSystemClassLoader>false</useSystemClassLoader>
|
||||
<junitArtifactName>none:none</junitArtifactName>
|
||||
<testNGArtifactName>org.testng:testng</testNGArtifactName>
|
||||
<argLine>-XX:+StartAttachListener</argLine>
|
||||
<argLine>@{argLine} -XX:+StartAttachListener</argLine>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<!-- must be on the classpath for test instrumentation -->
|
||||
<groupId>org.jacoco</groupId>
|
||||
<artifactId>org.jacoco.agent</artifactId>
|
||||
<classifier>runtime</classifier>
|
||||
<version>${jacoco.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
@ -1407,5 +1463,6 @@
|
||||
<surefire-version>3.0.0-M3</surefire-version>
|
||||
<reflections-version>0.9.10</reflections-version>
|
||||
<mockito-version>3.2.0</mockito-version>
|
||||
<jacoco.version>0.8.5</jacoco.version>
|
||||
</properties>
|
||||
</project>
|
||||
|
Loading…
x
Reference in New Issue
Block a user