Bump haskell/actions from 2.4.6 to 2.4.7 (#41) #73
This file contains 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: Haskell Stack | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
types: [opened, synchronize] | |
permissions: {} | |
jobs: | |
test: | |
name: CI | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false # don't cancel other jobs if one fails | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
# We don't split on multiple resolvers as the ~/.stack grows to ~700MB | |
# whereas all others (including Cabal ones) barely reach 50MB. Instead, | |
# we only use nightly as the resolver, as this should handle the newest | |
# GHC and is also the place where failures will be reported from Stack. | |
resolver: ["nightly"] | |
steps: | |
- name: "Checkout code" | |
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | |
with: | |
persist-credentials: false | |
- name: Setup Haskell Compiler (stack) | |
id: setup-haskell | |
uses: haskell/actions/setup@ce6c3a6f8cbe3bd6ce51b635b3f32ee792f22f91 # v2.4.7 | |
with: | |
enable-stack: true | |
stack-no-global: true | |
- name: Cache .stack-work | |
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 | |
with: | |
path: .stack-work | |
key: stack-work-${{ matrix.os }}-${{ matrix.resolver }}-${{ hashFiles('stack.yaml', '**/*.cabal') }}-${{ hashFiles('Main.hs') }} | |
restore-keys: | | |
stack-work-${{ matrix.os }}-${{ matrix.resolver }}-${{ hashFiles('stack.yaml', '**/*.cabal') }}- | |
stack-work-${{ matrix.os }}-${{ matrix.resolver }}- | |
- name: Cache ~/.stack | |
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 | |
with: | |
path: ${{ steps.setup-haskell.outputs.stack-root }} | |
key: stack-root-${{ matrix.os }}-${{ matrix.resolver }}-${{ hashFiles('stack.yaml', '**/*.cabal') }} | |
restore-keys: stack-root-${{ matrix.os }}-${{ matrix.resolver }}- | |
- name: Get dependencies | |
run: stack build --resolver=${{ matrix.resolver }} --only-dependencies --test --bench --no-run-tests --no-run-benchmarks | |
- name: Build code | |
run: stack build --resolver=${{ matrix.resolver }} --test --bench --no-run-tests --no-run-benchmarks | |
- name: Test code | |
run: stack test --resolver=${{ matrix.resolver }} | |
- name: Benchmark code | |
run: stack bench --resolver=${{ matrix.resolver }} | |
- name: Generate documentation | |
run: stack haddock --resolver=${{ matrix.resolver }} |