Bump actions/checkout from 4 to 5 #148
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: tests | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4.6.0 | |
| with: | |
| java-version: '17' | |
| distribution: 'corretto' | |
| cache: maven | |
| - name: Cache Maven packages | |
| uses: actions/cache@v4.2.2 | |
| with: | |
| path: ~/.m2 | |
| key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: ${{ runner.os }}-m2 | |
| # As of 2025-01-02, this does not work due to the following error: | |
| # Warning: EACCES: permission denied, scandir '/var/lib/docker' | |
| # There are many threads about caching docker layers: | |
| # https://github.com/orgs/community/discussions/26330 | |
| # https://github.com/actions/cache/issues/31 | |
| # https://github.com/actions/cache/issues/81 | |
| # https://github.com/actions/cache/issues/1224 | |
| # Most solutions seem focused on caching built images, no pulled images. | |
| # - name: Cache Docker layers | |
| # uses: actions/cache@v4.2.2 | |
| # with: | |
| # path: /var/lib/docker | |
| # key: ${{ runner.os }}-docker-layer-cache | |
| # restore-keys: ${{ runner.os }}-docker-layer-cache | |
| - name: Build and analyze | |
| run: | | |
| mvn \ | |
| -B \ | |
| clean \ | |
| verify \ | |
| --file pom.xml |