Merge pull request #239 from granule-project/dev-minor #19
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
name: Haskell CI | |
on: | |
push: | |
branches: [ "main", "dev-minor" ] | |
pull_request: | |
branches: [ "main", "dev-minor" ] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install required libraries | |
run: >- | |
sudo apt install | |
z3 | |
- name: Cache Stack build artifacts (user + project) | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.stack | |
.stack-work | |
# best effort for cache: tie it to Stack resolver and package config | |
key: ${{ runner.os }}-stack-${{ hashFiles('stack.yaml.lock', 'package.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-stack | |
- name: Setup Haskell | |
uses: actions/setup-haskell@v1 | |
- name: Install GHC using Stack | |
if: steps.ghc.outputs.cache-hit != 'true' | |
run: stack setup --install-ghc | |
- name: Build | |
run: stack build | |
- name: Run tests | |
run: stack test |