Another CI fix commit #3
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
on: [push] | |
name: Build and test | |
jobs: | |
ci: | |
name: Build on ${{ matrix.os }} | |
env: | |
stack: stack --system-ghc | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- name: Check out | |
uses: actions/checkout@v2 | |
- name: Setup Haskell | |
uses: haskell-actions/setup@v2 | |
with: | |
enable-stack: true | |
- name: Cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.stack | |
.stack-work | |
key: ${{ matrix.os }}-stack-${{ hashFiles('./stack.yaml.lock') }} | |
- name: Build package dependencies | |
run: | | |
$stack build --no-run-tests --no-run-benchmarks --only-dependencies | |
- name: Build package | |
run: | | |
$stack build --no-run-tests --no-run-benchmarks | |
- name: Build testing dependencies | |
run: | | |
$stack build --no-run-tests --no-run-benchmarks --test --bench | |
- name: Run tests | |
run: | | |
$stack build --test --no-run-benchmarks | |
- name: Build documentation | |
run: | | |
$stack haddock | |
- name: Check documentation | |
if: matrix.os != 'windows-latest' | |
run: | | |
$stack install doctest | |
$(stack path --local-bin)${path.sep}doctest src/ |