roboservant/.github/workflows/ci.yml

40 lines
1.2 KiB
YAML
Raw Normal View History

2021-03-23 02:12:07 +03:00
name: Stack CI
2020-06-06 18:04:57 +03:00
# 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:
2020-09-24 06:09:13 +03:00
stack: ["2.3.3"]
ghc: ["8.10.4"]
2020-09-13 21:07:37 +03:00
os: [ubuntu-latest]
2020-06-06 18:04:57 +03:00
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.4
2020-11-30 22:10:23 +03:00
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master'
2020-06-06 18:04:57 +03:00
name: Setup Haskell Stack
with:
ghc-version: ${{ matrix.ghc }}
stack-version: ${{ matrix.stack }}
enable-stack: true
- uses: actions/cache@v1
2020-11-30 22:10:23 +03:00
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master'
2020-06-06 18:04:57 +03:00
name: Cache ~/.stack
with:
path: ~/.stack
key: ${{ runner.os }}-${{ matrix.ghc }}-stack
- name: Test
2020-11-30 22:10:23 +03:00
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master'
2020-06-06 18:04:57 +03:00
run: |
2020-06-06 18:24:32 +03:00
stack test