- 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
31 lines
607 B
YAML
31 lines
607 B
YAML
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/
|