78 lines
1.9 KiB
YAML
78 lines
1.9 KiB
YAML
name: build-test
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
paths-ignore:
|
|
- '**.md'
|
|
pull_request:
|
|
paths-ignore:
|
|
- '**.md'
|
|
jobs:
|
|
test:
|
|
name: Unit Tests - ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, macOS-latest, windows-latest]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set Node.js 12
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: 12
|
|
# http://www.tiernok.com/posts/2019/faster-npm-installs-during-ci/
|
|
- run: npm ci --prefer-offline --no-audit --progress=false
|
|
- run: npm run pre-push
|
|
|
|
install-haskell:
|
|
name: GHC ${{ matrix.ghc }}, Cabal ${{ matrix.cabal }} - ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, macOS-latest, windows-latest]
|
|
ghc: ['8.8.3', '8.4.4']
|
|
cabal: ['3.0.0.0']
|
|
include:
|
|
- os: ubuntu-latest
|
|
ghc: '7.10.3'
|
|
cabal: '3.0.0.0'
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/cache@v1
|
|
if: matrix.os == 'macOS-latest'
|
|
with:
|
|
path: ~/.ghcup
|
|
key: ${{ runner.os }}-${{ matrix.ghc }}-ghcup
|
|
|
|
- uses: ./
|
|
with:
|
|
ghc-version: ${{ matrix.ghc }}
|
|
cabal-version: ${{ matrix.cabal }}
|
|
- run: runhaskell __tests__/hello.hs
|
|
- shell: bash
|
|
run: cd __tests__/project && cabal build && cabal run
|
|
|
|
install-stack:
|
|
name: Stack ${{ matrix.stack }} ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macOS-latest, windows-latest]
|
|
stack: ['latest', '1.9.1']
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: ./
|
|
with:
|
|
stack-version: ${{ matrix.stack }}
|
|
stack-no-global: true
|
|
- run: stack
|