From 651cc4459e847bce5cc7c97b195cddfb1c9cc9cc Mon Sep 17 00:00:00 2001 From: Thibaud Date: Fri, 27 Mar 2026 16:37:20 +0100 Subject: [PATCH] ci: add JaCoCo coverage gate and Gitea CI pipeline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- .gitea/workflows/ci.yaml | 30 ++++++++++++++++++++++++++++++ pom.xml | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 .gitea/workflows/ci.yaml diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml new file mode 100644 index 0000000..5d41499 --- /dev/null +++ b/.gitea/workflows/ci.yaml @@ -0,0 +1,30 @@ +name: CI + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + build-and-test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up JDK 16 + uses: actions/setup-java@v4 + with: + java-version: '16' + distribution: 'temurin' + + - name: Build and test with coverage + run: mvn verify --batch-mode + + - name: Upload coverage report + if: always() + uses: actions/upload-artifact@v4 + with: + name: jacoco-report + path: target/site/jacoco/ diff --git a/pom.xml b/pom.xml index 2ef5780..19caedc 100644 --- a/pom.xml +++ b/pom.xml @@ -25,6 +25,40 @@ maven-surefire-plugin 3.2.5 + + org.jacoco + jacoco-maven-plugin + 0.8.11 + + + + prepare-agent + report + check + + + + + + + ovh/gasser/newshapes/App.class + ovh/gasser/newshapes/ui/** + ovh/gasser/newshapes/Selection.class + + + + BUNDLE + + + LINE + COVEREDRATIO + 0.50 + + + + + +