Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 38 additions & 1 deletion .github/workflows/test-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,41 @@ jobs:
run: sudo apt-get update && sudo apt-get install -y wget zstd

- name: Build and test estore
run: mvn -pl estore clean test -Dmaven.compiler.release=8
run: mvn -pl estore clean test jacoco:report -Dmaven.compiler.release=8

- name: Upload JaCoCo report
if: always()
uses: actions/upload-artifact@v4
with:
name: jacoco-report
path: estore/target/site/jacoco/
if-no-files-found: ignore

- name: Upload coverage data
uses: actions/upload-artifact@v4
with:
name: jacoco-coverage-data
path: |
estore/target/jacoco.exec
estore/target/classes/

coverage:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "8"
cache: maven

- name: Download coverage data
uses: actions/download-artifact@v4
with:
name: jacoco-coverage-data
path: .

- name: Check coverage
run: mvn -pl estore jacoco:check -Dmaven.compiler.release=8
24 changes: 24 additions & 0 deletions estore/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,23 @@
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.13</version>
<configuration>
<excludes>
<exclude>org/estore/antlr4/**</exclude>
</excludes>
<rules>
<rule>
<element>BUNDLE</element>
<limits>
<limit>
<counter>LINE</counter>
<value>COVEREDRATIO</value>
<minimum>0.70</minimum>
</limit>
</limits>
</rule>
</rules>
</configuration>
<executions>
<execution>
<goals>
Expand All @@ -132,6 +149,13 @@
<goal>report</goal>
</goals>
</execution>
<execution>
<id>check</id>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
Expand Down
Loading