Bump version to 4.0.0 for release #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test & Coverage | |
| on: | |
| push: | |
| branches: [main, master, develop] | |
| pull_request: | |
| branches: [main, master, develop] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| checks: write # surface JUnit results as a check | |
| pull-requests: write # post coverage comment on PRs | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '21' | |
| cache: maven | |
| # Unit tests only — no real Bukkit server, no MariaDB, no Docker. | |
| # Listener / command / database packages are excluded from JaCoCo | |
| # because they require an integration environment to exercise. | |
| - name: Run tests + JaCoCo | |
| run: mvn -B -pl plugin -am test -DfailIfNoTests=false | |
| - name: Publish test results | |
| if: always() | |
| uses: mikepenz/action-junit-report@v4 | |
| with: | |
| report_paths: '**/plugin/target/surefire-reports/TEST-*.xml' | |
| require_tests: true | |
| detailed_summary: true | |
| - name: Upload coverage report on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report | |
| path: | | |
| plugin/target/surefire-reports/ | |
| plugin/target/site/jacoco/ | |
| # PR-only: comment with overall + per-changed-file coverage. | |
| # No hard gate — the goal is visibility on this fork; production gates | |
| # are enforced by the consumer plugins (treasury, business-rian). | |
| - name: Coverage report | |
| if: github.event_name == 'pull_request' | |
| uses: madrapps/jacoco-report@v1.7.1 | |
| with: | |
| paths: ${{ github.workspace }}/plugin/target/site/jacoco/jacoco.xml | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| min-coverage-overall: 0 | |
| min-coverage-changed-files: 60 | |
| title: Coverage report | |
| update-comment: true | |
| pass-emoji: ':white_check_mark:' | |
| fail-emoji: ':x:' |