Pipeline upgrade to Java 25 #9
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: Java CI with Maven | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| pull_request: | |
| branches: [ "master" ] | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 25 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '25' | |
| distribution: 'temurin' | |
| cache: maven | |
| - name: Build and Test with Maven | |
| run: mvn -B test | |
| - name: Add JaCoCo PR Comment | |
| uses: madrapps/jacoco-report@v1.6.1 | |
| if: github.event_name == 'pull_request' | |
| with: | |
| paths: ${{ github.workspace }}/target/site/jacoco/jacoco.xml | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| min-coverage-overall: 80 | |
| min-coverage-changed-files: 80 | |
| title: 'Code Coverage Report' | |
| update-comment: true | |
| - name: Generate JaCoCo Badge | |
| uses: cicirello/jacoco-badge-generator@v2 | |
| if: github.ref == 'refs/heads/master' | |
| with: | |
| badges-directory: .github/badges | |
| generate-branches-badge: true | |
| - name: Commit and push badge | |
| if: github.ref == 'refs/heads/master' | |
| run: | | |
| git config --local user.email "action@github.com" | |
| git config --local user.name "GitHub Action" | |
| git add .github/badges | |
| git diff --staged --quiet || git commit -m "chore: update coverage badge [skip ci]" | |
| git push |