Skip to content

Bump actions/cache from 4.1.0 to 4.1.1 #740

Bump actions/cache from 4.1.0 to 4.1.1

Bump actions/cache from 4.1.0 to 4.1.1 #740

Workflow file for this run

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@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: haskell-actions/setup@dd344bc1cec854a369df8814ce17ef337d6e6170 # v2.7.6
with:
enable-stack: true
- name: Cache dependencies
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
with:
path: ~/.stack
key: stack-${{ hashFiles('package.yaml', 'stack.yaml') }}
restore-keys: stack-
- name: Cache build artifacts
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
with:
path: .stack-work
key: build-${{ hashFiles('app/**', 'src/**', 'test/**') }}
restore-keys: build-
- 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@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: coverage-report
path: ${{ steps.coverage.outputs.report }}