Skip to content

Golden helper function #46

Golden helper function

Golden helper function #46

Workflow file for this run

name: Build and Test
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
ghc: ["8.8", "8.10", "9.0"]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: Setup Haskell
id: setup-haskell-cabal
uses: haskell-actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: "3.6"
- run: cabal update
- run: cabal freeze --enable-tests
- name: Cache dependencies and dist-newstyle
uses: actions/cache@v2
with:
path: |
${{ steps.setup-haskell-cabal.outputs.cabal-store }}
dist-newstyle
key: dependencies-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
restore-keys: |
dependencies-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
dependencies-${{ runner.os }}-${{ matrix.ghc }}-
- name: Install dependencies
run: cabal install --only-dependencies
- name: Build project
run: cabal build --enable-tests
- name: Run tests
run: cabal test --enable-tests