Skip to content

Bump github/codeql-action from 3.28.13 to 3.28.18 (#292) #950

Bump github/codeql-action from 3.28.13 to 3.28.18 (#292)

Bump github/codeql-action from 3.28.13 to 3.28.18 (#292) #950

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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Cache dependencies
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ~/.stack
key: stack-${{ hashFiles('package.yaml', 'stack.yaml') }}
restore-keys: stack-
- name: Cache build artifacts
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: .stack-work
key: build-${{ hashFiles('app/**', 'src/**', 'test/**') }}
restore-keys: build-
- uses: haskell-actions/setup@64445b6b5dd545faf5f8e2acee8253eb5c2b29aa # v2.7.11
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@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: coverage-report
path: ${{ steps.coverage.outputs.report }}