Bump some supported GHCs #576
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- '**' | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
- macOS-latest | |
ghc: | |
- '9.8.2' | |
- '9.6.4' | |
- '9.4.8' | |
- '9.2.8' | |
cabal: | |
- '3.10.1.0' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: haskell-actions/setup@v2 | |
id: setup-haskell | |
with: | |
ghc-version: ${{ matrix.ghc }} | |
cabal-version: ${{ matrix.cabal }} | |
- name: Freeze dependencies | |
run: cabal freeze | |
- uses: actions/cache@v4 | |
with: | |
path: ${{ steps.setup-haskell.outputs.cabal-store }} | |
key: ci-${{ runner.os }}-${{ matrix.cabal }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }} | |
restore-keys: | | |
ci-${{ runner.os }}-${{ matrix.cabal }}-${{ matrix.ghc }}- | |
- name: Add path | |
run: | | |
mkdir -p ~/bin | |
echo ~/bin >> "$GITHUB_PATH" | |
- name: Install goldplate | |
run: | | |
case "$OSTYPE" in | |
linux* ) | |
curl -L https://github.com/fugue/goldplate/releases/download/v0.2.1/goldplate-v0.2.1-linux-x86_64.tar.gz | tar xz -C ~/bin | |
;; | |
darwin* ) | |
curl -L https://github.com/fugue/goldplate/releases/download/v0.2.1/goldplate-v0.2.1-darwin-x86_64.tar.gz | tar xz -C ~/bin | |
;; | |
esac | |
- name: Configure | |
run: | | |
rm cabal.project.freeze | |
cabal configure --jobs --flags=pedantic | |
- name: Build | |
run: cabal install --overwrite-policy=always | |
- name: Configure for Test | |
run: | | |
rm -fv cabal.project.local | |
cabal configure --enable-tests --jobs --flags=pedantic | |
- name: Run tests | |
run: cabal test | |
- name: Run golden tests | |
run: goldplate --pretty-diff golden-test | |
cabal-format: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
ghc: ['9.2.8'] | |
cabal: ['3.10.1.0'] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: haskell-actions/setup@v2 | |
id: setup-haskell | |
with: | |
ghc-version: ${{ matrix.ghc }} | |
cabal-version: ${{ matrix.cabal }} | |
- uses: actions/cache@v4 | |
with: | |
path: ${{ steps.setup-haskell.outputs.cabal-store }} | |
key: format-${{ runner.os }}-${{ matrix.cabal }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project') }} | |
restore-keys: | | |
format-${{ runner.os }}-${{ matrix.cabal }}-${{ matrix.ghc }}- | |
- name: Install cabal-fmt | |
run: cabal install --overwrite-policy=always -j cabal-fmt | |
- name: Run cabal-fmt | |
run: cabal-fmt --check --Werror haskellorls.cabal | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run ormolu | |
uses: mrkkrp/ormolu-action@v15 | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: haskell-actions/hlint-setup@v2 | |
with: | |
version: '3.6.1' | |
- name: Run hlint | |
uses: haskell-actions/hlint-run@v2 | |
with: | |
fail-on: status | |
path: '["app/", "src/", "test/"]' | |
actionlint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run actionlint | |
run: | | |
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) | |
./actionlint -color |