Skip to content

Wrap Data.Aeson.Value in a newtype SafeValue #60

Wrap Data.Aeson.Value in a newtype SafeValue

Wrap Data.Aeson.Value in a newtype SafeValue #60

Workflow file for this run

name: CI
# Trigger the workflow on push or pull request, but only for the master branch
on:
pull_request:
push:
branches: [master]
jobs:
cabal:
name: cabal / ${{ matrix.os }} / ghc ${{ matrix.ghc }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.ghc == '9.10.1' }}
strategy:
matrix:
os:
- ubuntu-latest
- macOS-latest
cabal: ["latest"]
ghc:
- "9.0.2"
- "9.2.8"
- "9.4.8"
- "9.6.6"
- "9.8.2"
- "9.10.1"
steps:
- uses: actions/checkout@v4
#if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master'
- uses: haskell-actions/setup@v2
id: setup-haskell-cabal
name: Setup Haskell
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- uses: actions/cache@v4
name: Cache cabal-store
with:
path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }}
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal
- name: Build
run: |
cabal update
cabal build all --enable-tests --enable-benchmarks --write-ghc-environment-files=always
- name: Test
run: |
cabal test all --enable-tests
stack:
name: stack ${{ matrix.resolver }}
runs-on: ubuntu-latest
# This makes the CI jobs not all be cancelled if nightly fails to build.
# However, if nightly fails to build, CI still gets a red X in the GitHub UI.
# Ideally we want CI as a whole to pass even if nightly fails. There doesn't
# appear to be a way to work around this for now.
#
# When some sort of `allow-failure` functionality is available in GitHub
# actions, we should switch to it:
# https://github.com/actions/toolkit/issues/399
continue-on-error: ${{ matrix.resolver == '--resolver nightly' }}
strategy:
matrix:
stack: ["latest"]
resolver:
- "--resolver lts-18" # GHC 8.10.7
- "--resolver lts-19" # GHC 9.0.2
- "--resolver lts-20" # GHC 9.2.8
- "--resolver lts-21" # GHC 9.4.8
- "--resolver lts-22" # GHC 9.6.6
- "--resolver nightly" # GHC 9.8.2
steps:
- uses: actions/checkout@v4
#if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master'
- uses: haskell-actions/setup@v2
name: Setup Haskell Stack
with:
stack-version: ${{ matrix.stack }}
enable-stack: true
- uses: actions/cache@v4
name: Cache ~/.stack
with:
path: ~/.stack
key: ${{ runner.os }}-${{ matrix.resolver }}-stack
- name: Build
run: |
stack build ${{ matrix.resolver }} --test --bench --no-run-tests --no-run-benchmarks --ghc-options="-j -Wall -Wredundant-constraints -Wpartial-fields -Wincomplete-uni-patterns -Wincomplete-record-updates"
- name: Test
run: |
stack test ${{ matrix.resolver }}