roboservant/.github/workflows/ci.yml
2020-09-23 23:09:13 -04:00

37 lines
876 B
YAML

name: CI
# Trigger the workflow on push or pull request, but only for the master branch
on:
pull_request:
push:
jobs:
stack:
name: ${{ matrix.os }}-${{ matrix.ghc }}-stack
runs-on: ${{ matrix.os }}
strategy:
matrix:
stack: ["2.3.3"]
ghc: ["8.8.3"]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master'
- uses: actions/setup-haskell@v1.1
name: Setup Haskell Stack
with:
ghc-version: ${{ matrix.ghc }}
stack-version: ${{ matrix.stack }}
enable-stack: true
- uses: actions/cache@v1
name: Cache ~/.stack
with:
path: ~/.stack
key: ${{ runner.os }}-${{ matrix.ghc }}-stack
- name: Test
run: |
stack test