Require JDK 25 with an actionable pre-flight error; drop legacy 6.08 docs #368
Workflow file for this run
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
| # This workflow builds PCGen with Gradle. The `build` and `integration-tests` | |
| # jobs run in parallel — they share the Gradle build cache via setup-gradle@v4 | |
| # but otherwise compile their inputs independently. Splitting the previous | |
| # single-job sequence (`./gradlew build` then `./gradlew itest datatest slowtest`) | |
| # shaves the ~4 min compile/spotbugs/unit-test phase off the critical path of | |
| # the ~16 min slow-test phase. | |
| name: Build PCGen with Gradle | |
| on: | |
| pull_request: | |
| push: | |
| branches: [master] | |
| jobs: | |
| build: | |
| name: Build, unit tests, and static analysis | |
| runs-on: ubuntu-latest | |
| permissions: | |
| checks: write | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 25 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '25' | |
| distribution: 'temurin' | |
| # setup-gradle@v4 is the canonical Gradle cache for GitHub Actions. | |
| # See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| - name: Build with Gradle Wrapper | |
| run: ./gradlew build --stacktrace | |
| - name: Publish Unit Test Results | |
| uses: EnricoMi/publish-unit-test-result-action@v2 | |
| if: always() | |
| with: | |
| check_name: 'Unit Test Results' | |
| files: | | |
| build/test-results/test/**/*.xml | |
| PCGen-base/build/test-results/**/*.xml | |
| PCGen-Formula/build/test-results/**/*.xml | |
| - name: Run Coverage | |
| run: ./gradlew testCoverage --stacktrace | |
| - name: Upload Report to artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: testCoverage | |
| path: ${{ github.workspace }}/build/reports/jacoco/testCoverage/html | |
| - name: Jacoco Report to PR | |
| id: jacoco | |
| uses: madrapps/jacoco-report@v1.7.2 | |
| with: | |
| paths: | | |
| ${{ github.workspace }}/build/reports/jacoco/testCoverage/testCoverage.xml | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| title: '## :construction: PCGen Code Coverage' | |
| update-comment: true | |
| debug-mode: false | |
| - name: Get the Coverage info | |
| run: | | |
| echo "Total coverage ${{ steps.jacoco.outputs.coverage-overall }}" | |
| echo "Changed Files coverage ${{ steps.jacoco.outputs.coverage-changed-files }}" | |
| integration-tests: | |
| name: Integration, data, and slow tests | |
| runs-on: ubuntu-latest | |
| permissions: | |
| checks: write | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 25 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '25' | |
| distribution: 'temurin' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| - name: Run integration, data, and slow tests | |
| run: ./gradlew itest datatest slowtest --stacktrace | |
| - name: Publish Integration Test Results | |
| uses: EnricoMi/publish-unit-test-result-action@v2 | |
| if: always() | |
| with: | |
| check_name: 'Integration Test Results' | |
| files: | | |
| build/test-results/itest/**/*.xml | |
| build/test-results/slowtest/**/*.xml |