Merge pull request #1 from commercialhaskell/synonyn #6
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: Tests | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
# As of 7 December 2023, ubuntu-latest, windows-latest and macos-latest come | |
# with Stack 2.13.1. | |
jobs: | |
build: | |
name: CI | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
stack-yaml: | |
- stack-ghc-8.10.7.yaml | |
- stack-ghc-9.0.2.yaml | |
- stack-ghc-9.2.8.yaml | |
- stack-ghc-9.4.8.yaml | |
- stack-ghc-9.6.3.yaml | |
include: | |
- os: macos-latest | |
stack-yaml: stack-ghc-9.4.8.yaml | |
- os: windows-latest | |
stack-yaml: stack-ghc-9.4.8.yaml | |
steps: | |
- name: Clone project | |
uses: actions/checkout@v3 | |
- name: Cache dependencies on Unix-like OS | |
if: startsWith(runner.os, 'Linux') || startsWith(runner.os, 'macOS') | |
uses: actions/cache@v3 | |
with: | |
path: ~/.stack | |
key: ${{ runner.os }}-${{ matrix.stack-yaml }} | |
- name: Cache dependencies on Windows | |
if: startsWith(runner.os, 'Windows') | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~\AppData\Roaming\stack | |
~\AppData\Local\Programs\stack | |
key: ${{ runner.os }}-${{ matrix.stack-yaml }} | |
- name: Build | |
shell: bash | |
run: | | |
set -ex | |
stack build --stack-yaml ${{ matrix.stack-yaml }} --haddock --no-haddock-deps |