Bump actions/dependency-review-action from 4.7.1 to 4.8.1 (#306) #1008
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 | |
| permissions: read-all | |
| on: | |
| push: | |
| workflow_call: | |
| inputs: | |
| coverage: | |
| required: false | |
| type: boolean | |
| jobs: | |
| build: | |
| concurrency: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Cache dependencies | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 | |
| with: | |
| path: ~/.stack | |
| key: stack-${{ hashFiles('package.yaml', 'stack.yaml') }} | |
| restore-keys: stack- | |
| - name: Cache build artifacts | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 | |
| with: | |
| path: .stack-work | |
| key: build-${{ hashFiles('app/**', 'src/**', 'test/**') }} | |
| restore-keys: build- | |
| - uses: haskell-actions/setup@7909071ceec0344debcc968c6c7a96a52e8dd0d7 # v2.8.1 | |
| with: | |
| enable-stack: true | |
| - name: Build and test | |
| if: ${{ !inputs.coverage }} | |
| run: stack build --test | |
| - name: Coverage | |
| id: coverage | |
| if: ${{ inputs.coverage }} | |
| run: | | |
| stack build --test --coverage | |
| echo "report=$(stack path --local-hpc-root)" >> $GITHUB_OUTPUT | |
| - name: Upload coverage report | |
| if: ${{ inputs.coverage }} | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: coverage-report | |
| path: ${{ steps.coverage.outputs.report }} |