1
1
mirror of https://github.com/github/semantic.git synced 2024-12-18 20:31:55 +03:00
semantic/.github/workflows/haskell.yml

67 lines
1.8 KiB
YAML
Raw Normal View History

name: Haskell CI
2019-12-17 23:02:03 +03:00
on:
# Trigger the workflow on push or pull request,
# but only for the master branch
push:
branches:
- master
pull_request:
jobs:
build:
name: ghc ${{ matrix.ghc }}
runs-on: ubuntu-16.04
strategy:
matrix:
ghc: ["8.8.1"]
cabal: ["3.0"]
steps:
- uses: actions/checkout@master
2019-12-18 03:08:25 +03:00
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master'
- uses: actions/setup-haskell@v1
name: Setup Haskell
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- uses: actions/cache@v1
name: Cache ~/.cabal/packages
with:
path: ~/.cabal/packages
2019-12-18 22:24:23 +03:00
key: ${{ runner.os }}-${{ matrix.ghc }}-v1-cabal-packages
- uses: actions/cache@v1
name: Cache ~/.cabal/store
with:
path: ~/.cabal/store
2019-12-18 22:24:23 +03:00
key: ${{ runner.os }}-${{ matrix.ghc }}-v1-cabal-store
- uses: actions/cache@v1
name: Cache dist-newstyle
with:
path: dist-newstyle
2019-12-13 22:09:56 +03:00
key: ${{ runner.os }}-${{ matrix.ghc }}-semantic-dist
- name: Install dependencies
run: |
cabal v2-update
cabal v2-configure --disable-optimization --enable-benchmarks --enable-tests --write-ghc-environment-files=always -j2
cabal v2-build --only-dependencies
- name: hlint
run: |
cabal install hlint --installdir=dist-newstyle
dist-newstyle/hlint src semantic-python
2019-12-16 20:20:11 +03:00
- name: Build & test
run: |
cabal v2-build
cabal v2-run semantic:test
cabal v2-run semantic-core:test
cabal v2-run semantic-python:test
2019-12-17 19:26:13 +03:00
cd semantic-source; cabal v2-run semantic-source:test; cd ..
cd semantic-source; cabal v2-run semantic-source:doctest -- src; cd ..