Repository navigation
chore(deps): update cerbos/actions digest to d710ac8 #315
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: Test | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| defaults: | |
| run: | |
| shell: bash | |
| permissions: {} | |
| jobs: | |
| testMatrix: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| strategy: | |
| max-parallel: 1 | |
| matrix: | |
| java: ["17", "21"] | |
| name: "Java ${{ matrix.java }}" | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5.4.0 | |
| with: | |
| java-version: "${{ matrix.java }}" | |
| distribution: "temurin" | |
| cache: "gradle" | |
| - name: Validate Gradle wrapper | |
| uses: gradle/actions/wrapper-validation@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0 | |
| - name: Run tests | |
| run: ./gradlew test | |
| env: | |
| CERBOS_HUB_API_ENDPOINT: "${{ secrets.CERBOS_HUB_API_ENDPOINT }}" | |
| CERBOS_HUB_CLIENT_ID: "${{ secrets.CERBOS_HUB_CLIENT_ID }}" | |
| CERBOS_HUB_CLIENT_SECRET: "${{ secrets.CERBOS_HUB_CLIENT_SECRET }}" | |
| CERBOS_HUB_STORE_ID: "${{ secrets.CERBOS_HUB_STORE_ID }}" | |
| - name: Store reports | |
| if: failure() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: "Reports for Java ${{ matrix.java }}" | |
| path: |- | |
| **/build/reports/ | |
| **/build/test-results/ | |
| testSuccess: | |
| runs-on: ubuntu-latest | |
| needs: testMatrix | |
| if: always() | |
| steps: | |
| - name: Check test results | |
| run: test "${{ needs.testMatrix.result }}" = "success" |