graphql/.github/workflows/haskell.yml
2020-07-03 07:00:37 +02:00

64 lines
1.5 KiB
YAML

name: Haskell CI
on:
push: ~
pull_request:
branches: [master]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-haskell@v1
with:
enable-stack: true
stack-no-global: true
stack-version: latest
- name: Cache
uses: actions/cache@v2
with:
path: |
~/.stack
stack.yaml.lock
key: ${{ runner.os }}-test-${{ hashFiles('**/stack.yaml') }}
restore-keys: ${{ runner.os }}-test-
- name: Install dependencies
run: stack --no-terminal test --only-snapshot
- name: Run tests
run: stack --no-terminal test --pedantic
- name: Build the documentation
run: |
stack --no-terminal ghc -- -Wall -Werror -fno-code docs/tutorial/tutorial.lhs
stack --no-terminal haddock --no-haddock-deps
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-haskell@v1
with:
enable-stack: true
stack-no-global: true
stack-version: latest
- name: Cache
uses: actions/cache@v2
with:
path: |
~/.stack
stack.yaml.lock
key: ${{ runner.os }}-lint-${{ hashFiles('**/stack.yaml') }}
restore-keys: ${{ runner.os }}-lint-
- name: Build HLint
run: stack --no-terminal build hlint
- name: Install HLint
run: stack --no-terminal install hlint
- name: Lint
run: stack --no-terminal exec hlint -- src tests docs