Cache Maven dependencies using setup-java built-in support #125
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
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| linux: | |
| runs-on: ubuntu-latest | |
| name: Java ${{ matrix.java }} | |
| strategy: | |
| matrix: | |
| java: [8, 11, 17, 21, 25] | |
| env: | |
| REPO_SLUG: ${{ github.repository }} | |
| BRANCH: ${{ github.head_ref }} | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: Set up JDK ${{ matrix.java }} | |
| uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5 | |
| with: | |
| java-version: ${{ matrix.java }} | |
| distribution: 'temurin' | |
| cache: 'maven' | |
| - name: Execute tests | |
| run: mvn verify | |
| - name: check license header is present in all files | |
| run: mvn license:check | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5 |