fix badges #9
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: main | |
on: | |
- push | |
- pull_request | |
jobs: | |
test: | |
strategy: | |
matrix: | |
ghc: ['9.2.8', '9.4.4', '9.6.2'] | |
test: [doctest, spec] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: haskell/actions/setup@v2 | |
id: setup-haskell | |
with: | |
ghc-version: ${{ matrix.ghc }} | |
- run: cp cabal.project.${{ matrix.ghc }}.freeze cabal.project.freeze | |
- uses: actions/cache/restore@v3 | |
with: | |
path: | | |
${{ steps.setup-haskell.outputs.cabal-store }} | |
./dist-newstyle | |
key: cabal-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('./cabal.project.freeze') }} | |
restore-keys: cabal-${{ runner.os }}-${{ matrix.ghc }}- | |
- run: make build-deps | |
- uses: actions/cache/save@v3 | |
with: | |
path: | | |
${{ steps.setup-haskell.outputs.cabal-store }} | |
./dist-newstyle | |
key: cabal-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('./cabal.project.freeze') }} | |
- run: make build | |
env: | |
CABAL_OPTIONS: --ghc-options -Werror | |
- run: make ${{ matrix.test }} | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: haskell/actions/hlint-setup@v2 | |
- run: sudo apt-get install libtinfo5 | |
- run: make lint | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- run: curl -sL https://raw.github.com/haskell/stylish-haskell/master/scripts/latest.sh | sh -s -- --inplace --recursive src app test | |
- run: git diff --exit-code |