ci: add JaCoCo coverage gate and Gitea CI pipeline
- Add JaCoCo maven plugin (0.8.11) with prepare-agent, report, and check goals - Set 50% bundle-level line coverage gate (to be raised as test coverage grows) - Exclude UI classes (App, Controller, ShapesView, etc.) from coverage checks since they require a display and cannot be unit-tested - Add Gitea Actions workflow: checkout → JDK 16 → mvn verify → upload report Closes #14
This commit is contained in:
34
pom.xml
34
pom.xml
@@ -25,6 +25,40 @@
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>3.2.5</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.jacoco</groupId>
|
||||
<artifactId>jacoco-maven-plugin</artifactId>
|
||||
<version>0.8.11</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>prepare-agent</goal>
|
||||
<goal>report</goal>
|
||||
<goal>check</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<!-- UI classes require a display and cannot be unit-tested -->
|
||||
<exclude>ovh/gasser/newshapes/App.class</exclude>
|
||||
<exclude>ovh/gasser/newshapes/ui/**</exclude>
|
||||
<exclude>ovh/gasser/newshapes/Selection.class</exclude>
|
||||
</excludes>
|
||||
<rules>
|
||||
<rule>
|
||||
<element>BUNDLE</element>
|
||||
<limits>
|
||||
<limit>
|
||||
<counter>LINE</counter>
|
||||
<value>COVEREDRATIO</value>
|
||||
<minimum>0.50</minimum>
|
||||
</limit>
|
||||
</limits>
|
||||
</rule>
|
||||
</rules>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user