Skip to content

Commit

Permalink
Merge pull request #226 from SupercedeTech/attempt-add-github-actions
Browse files Browse the repository at this point in the history
Attempt add github action.
  • Loading branch information
jappeace authored Nov 4, 2021
2 parents 709e1ab + 98720a6 commit 241240f
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/stack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Stack

on:
pull_request:
push:
branches:
- master

jobs:
build:
name: CI
runs-on: ${{ matrix.os }}
env:
STACK_ROOT: ${{ github.workspace }}/.stack
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
resolver: [nightly, lts-18, lts-17, lts-16]
# Bugs in GHC make it crash too often to be worth running
exclude:
- os: windows-latest
resolver: nightly
- os: windows-latest
resolver: lts-16
steps:
- name: Clone project
uses: actions/checkout@v2
with:
submodules: 'true'

- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
~/.stack
${{ github.workspace }}/.stack
key: ${{ runner.os }}-${{ matrix.resolver }}-haskell-${{ hashFiles('stack.yaml') }}
restore-keys: |
${{ runner.os }}-${{ matrix.resolver }}-haskell-
- name: Build and run tests
shell: bash
run: |
set -ex
curl -sSL https://get.haskellstack.org/ | sh -s - -f
stack test --fast --no-terminal --resolver=${{ matrix.resolver }}

0 comments on commit 241240f

Please sign in to comment.