Update actions/checkout and actions/setup-java #46
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: Build and run tests | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@248ae51c2e8cc9622ecf50685c8bf7150c6e8813 # v1.4.3 | |
| with: | |
| # Using audit because some endpoints are not reliably fixed. We could | |
| # try to nail them down, but it would turn into a game of whack-a-mole. | |
| egress-policy: audit | |
| disable-telemetry: true | |
| - uses: actions/checkout@v4 # v3 | |
| - name: set up JDK 11 | |
| uses: actions/setup-java@v4 # v3 | |
| with: | |
| java-version: '11' | |
| distribution: 'temurin' | |
| cache: maven | |
| - name: Build | |
| run: mvn package --file pom.xml -DskipTests | |
| - name: Test | |
| run: mvn test --file pom.xml -X |