Skip to content

Commit 8ba04ba

Browse files
committed
Added jacoco coverage test to core package and variable for min coverage
1 parent 00453c5 commit 8ba04ba

File tree

2 files changed

+45
-1
lines changed

2 files changed

+45
-1
lines changed

aws-serverless-java-container-core/pom.xml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,50 @@
6767

6868
<build>
6969
<plugins>
70+
<plugin>
71+
<groupId>org.jacoco</groupId>
72+
<artifactId>jacoco-maven-plugin</artifactId>
73+
<version>0.8.1</version>
74+
<configuration>
75+
<destFile>${basedir}/target/coverage-reports/jacoco-unit.exec</destFile>
76+
<dataFile>${basedir}/target/coverage-reports/jacoco-unit.exec</dataFile>
77+
</configuration>
78+
<executions>
79+
<execution>
80+
<id>default-prepare-agent</id>
81+
<goals>
82+
<goal>prepare-agent</goal>
83+
</goals>
84+
</execution>
85+
<execution>
86+
<id>jacoco-site</id>
87+
<phase>package</phase>
88+
<goals>
89+
<goal>report</goal>
90+
</goals>
91+
</execution>
92+
<execution>
93+
<id>jacoco-check</id>
94+
<phase>test</phase>
95+
<goals>
96+
<goal>check</goal>
97+
</goals>
98+
<configuration>
99+
<haltOnFailure>true</haltOnFailure>
100+
<rules><rule>
101+
<element>BUNDLE</element>
102+
<limits>
103+
<limit>
104+
<counter>INSTRUCTION</counter>
105+
<value>COVEREDRATIO</value>
106+
<minimum>${jacoco.minCoverage}</minimum>
107+
</limit>
108+
</limits>
109+
</rule></rules>
110+
</configuration>
111+
</execution>
112+
</executions>
113+
</plugin>
70114
<plugin>
71115
<groupId>com.github.spotbugs</groupId>
72116
<artifactId>spotbugs-maven-plugin</artifactId>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
</licenses>
4141

4242
<properties>
43-
<jacoco.minCoverage>0.7</jacoco.minCoverage>
43+
<jacoco.minCoverage>0.1</jacoco.minCoverage>
4444
</properties>
4545

4646
<dependencies>

0 commit comments

Comments
 (0)