mirror of
https://github.com/i-am-tom/higgledy.git
synced 2024-08-16 11:30:33 +03:00
47 lines
1019 B
YAML
47 lines
1019 B
YAML
name: CI
|
|
|
|
# Trigger the workflow on push or pull request, but only for the master branch
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- "**"
|
|
push:
|
|
branches:
|
|
- "master"
|
|
|
|
jobs:
|
|
build:
|
|
name: ghc ${{ matrix.ghc }}
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
ghc:
|
|
- "8.10.7"
|
|
- "9.2.5"
|
|
- "9.4.4"
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master'
|
|
|
|
- uses: haskell/actions/setup@v2
|
|
name: Setup Haskell
|
|
with:
|
|
ghc-version: ${{ matrix.ghc }}
|
|
cabal-version: ${{ matrix.cabal }}
|
|
|
|
- uses: actions/cache@v1
|
|
name: Cache ~/.cabal/store
|
|
with:
|
|
path: ~/.cabal/store
|
|
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal
|
|
|
|
- name: Build
|
|
run: |
|
|
cabal v2-update
|
|
cabal v2-build --enable-tests --enable-benchmarks
|
|
|
|
- name: Test
|
|
run: |
|
|
cabal v2-test --enable-tests
|