-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #226 from SupercedeTech/attempt-add-github-actions
Attempt add github action.
- Loading branch information
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |