| name: Build |
| on: |
| push: |
| branches: |
| - master |
| pull_request: |
| |
| jobs: |
| test: |
| runs-on: ${{ matrix.os }} |
| strategy: |
| matrix: |
| os: [ubuntu-latest, windows-latest, macOS-latest] |
| # choosing to run a reduced set of LTS, current, and next, to balance coverage and execution time |
| java: [8, 17, 21] |
| fail-fast: false |
| name: Test JDK ${{ matrix.java }}, ${{ matrix.os }} |
| steps: |
| - name: Checkout |
| uses: actions/checkout@v4 |
| |
| - name: Set up JDK ${{ matrix.java }} |
| uses: actions/setup-java@v3 |
| with: |
| java-version: ${{ matrix.java }} |
| distribution: 'temurin' |
| cache: 'maven' |
| |
| - name: Maven Compile |
| run: mvn -X compile -B --file pom.xml |
| |
| - name: Maven Verify |
| run: mvn -X verify -B --file pom.xml |
| ... |