Added type mismatch example #4
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: tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
ghc: ['9.4.8'] | |
cabal: ['3.0.0.0'] | |
os: [ubuntu-latest] | |
resolver: [lts-21.1] | |
exclude: | |
# GHC 8.8+ only works with cabal v3+ | |
- ghc: 8.8.3 | |
cabal: 2.4.1.0 | |
name: Using resolver ${{ matrix.resolver }} with ghc version ${{ matrix.ghc }} and cabal ${{ matrix.cabal }} | |
steps: | |
- name: Check out | |
uses: actions/checkout@v3 | |
- name: Setup Haskell | |
uses: haskell/actions/setup@v1 | |
with: | |
ghc-version: ${{ matrix.ghc }} | |
cabal-version: ${{ matrix.cabal }} | |
enable-stack: true | |
- name: Versions | |
run: | | |
stack --version | |
cabal --version | |
ghc --version | |
- name: Initalize stack for LTS | |
run: | | |
stack update | |
stack init --resolver ${{ matrix.resolver }} --force | |
- name: Build package dependencies | |
run: | | |
stack --resolver ${{ matrix.resolver }} build --no-run-tests --no-run-benchmarks --only-dependencies | |
- name: Build package | |
run: | | |
stack --resolver ${{ matrix.resolver }} build --no-run-tests --no-run-benchmarks --pedantic | |
- name: Build testing dependencies | |
run: | | |
stack --resolver ${{ matrix.resolver }} build --no-run-tests --no-run-benchmarks --test --bench | |
- name: Run tests | |
run: | | |
stack --resolver ${{ matrix.resolver }} build --test --no-run-benchmarks | |
- name: Package list | |
run: | | |
stack --resolver ${{ matrix.resolver }} exec ghc-pkg list || true |