Skip to content

remove strategy directive from ci cabal format job #587

remove strategy directive from ci cabal format job

remove strategy directive from ci cabal format job #587

Workflow file for this run

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'
steps:
- uses: actions/checkout@v4
- uses: haskell-actions/setup@v2
id: setup-haskell
with:
ghc-version: ${{ matrix.ghc }}
- name: Configure the build and dry-run it
run: |
cabal configure --enable-tests --jobs --flags=pedantic
cabal build all --dry-run
- uses: actions/cache@v4
with:
path: ${{ steps.setup-haskell.outputs.cabal-store }}
key: ci-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('**/plan.json') }}
restore-keys: |
ci-${{ runner.os }}-${{ matrix.ghc }}-
- name: Test
run: cabal test
- name: Install
run: cabal install --overwrite-policy=always
- name: Run golden tests
env:
GOLDPLATE_TAGNAME: v0.2.1.1
run: |
case "$OSTYPE" in
linux* )
curl -L "https://github.com/fugue/goldplate/releases/download/${GOLDPLATE_TAGNAME}/goldplate-${GOLDPLATE_TAGNAME}-linux-x86_64.tar.gz" | tar xz -C . goldplate
;;
darwin* )
curl -L "https://github.com/fugue/goldplate/releases/download/${GOLDPLATE_TAGNAME}/goldplate-${GOLDPLATE_TAGNAME}-darwin-x86_64.tar.gz" | tar xz -C . goldplate
;;
esac
./goldplate --pretty-diff golden-test
cabal-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: haskell-actions/setup@v2
id: setup-haskell
with:
ghc-version: '9.2.8'
- uses: actions/cache@v4
with:
path: ${{ steps.setup-haskell.outputs.cabal-store }}
key: format-${{ runner.os }}-${{ steps.setup-haskell.outputs.ghc-version }}-${{ hashFiles('cabal.project') }}
restore-keys: |
format-${{ runner.os }}-${{ steps.setup-haskell.outputs.ghc-version }}-
- 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