Created
February 4, 2020 19:01
-
-
Save andys8/1d84ce0eeb72647c38f23bc843322a0e to your computer and use it in GitHub Desktop.
Haskell CI (Github Actions)
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] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions/cache@v1 | |
name: Cache ~/.stack | |
with: | |
path: ~/.stack | |
key: ${{ runner.os }}-homestack | |
- uses: actions/cache@v1 | |
name: Cache .stack-work | |
with: | |
path: .stack-work | |
key: ${{ runner.os }}-stackwork | |
- name: Stack setup | |
run: stack setup | |
- name: Build | |
run: stack build | |
- name: Run tests | |
run: stack test | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: cachix/install-nix-action@v6 | |
- name: Lint | |
run: nix-shell -p hlint --command "make lint" | |
- name: Format check | |
run: nix-shell -p pkgs.haskellPackages.brittany --command "make format-check" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment