Merge pull request #252 from ilya-bobyr/master #84
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: CI | |
on: | |
pull_request: | |
push: | |
branches: [master] | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
name: Cache ~/.stack | |
with: | |
path: ~/.stack | |
key: stack-global-${{ hashFiles('stack.yaml') }} | |
restore-keys: stack-global- | |
- uses: actions/cache@v3 | |
name: Cache .stack-work | |
with: | |
path: .stack-work | |
key: stack-work-${{ hashFiles('stack.yaml') }}-${{ hashFiles('package.yaml') }}-${{ hashFiles('**/*.hs') }} | |
restore-keys: stack-work- | |
- uses: haskell/actions/setup@v2 | |
name: Setup Haskell Stack | |
with: | |
stack-version: latest | |
stack-no-global: true | |
stack-setup-ghc: true | |
enable-stack: true | |
- name: Install non-hs dependencies | |
run: sudo apt-get update && sudo apt-get install libgtk-3-dev gobject-introspection libgirepository1.0-dev libwebkit2gtk-4.0-dev libgtksourceview-3.0-dev | |
- name: Install dependencies | |
run: stack build --only-dependencies | |
- name: Build | |
run: stack build | |
- name: Test | |
run: stack test |