Files
setup-haskell/.github/workflows/workflow.yml
Andy McKay 198b4e4e44 Rename default branch
This updates the Action to work with the new default branch
2020-07-21 09:03:47 -07:00

88 lines
2.2 KiB
YAML

name: build-test
on:
push:
branches:
- main
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 test
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: ['latest', '8.4.4']
cabal: ['latest']
include:
- os: ubuntu-latest
ghc: '7.10.3'
cabal: '3.0.0.0'
- os: ubuntu-latest
ghc: '8.2.2'
cabal: '2.0'
steps:
- uses: actions/checkout@v2
- uses: ./
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- run: |
runhaskell --version
runhaskell __tests__/hello.hs
- shell: bash
run: cd __tests__/project && cabal build && cabal run
- run: |
cabal --version
ghc --version
- shell: bash
if: matrix.ghc != 'latest'
# this check depends on the ghc versions being "exact" in the matrix
run: |
[[ $(ghc --numeric-version) == ${{ matrix.ghc }} ]]
install-stack:
name: Stack ${{ matrix.stack }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
stack: ['latest', '1.9.1']
steps:
- uses: actions/checkout@v2
- uses: ./
with:
enable-stack: true
stack-no-global: true
stack-version: ${{ matrix.stack }}
- run: |
stack --version
stack