ci #69
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
# taken from https://github.com/kowainik/summoner/blob/main/.github/workflows/ci.yml | |
name: ci | |
on: | |
# Build every pull request, to check for regressions. | |
pull_request: | |
types: [opened, reopened, synchronize] | |
# Build when a PR is merged, to update the README's CI badge. | |
push: | |
branches: [main] | |
# Build once a month, to detect missing upper bounds. | |
schedule: | |
- cron: '0 0 1 * *' | |
jobs: | |
stack: | |
name: stack / ghc ${{ matrix.ghc }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
stack: ["2.7.3"] | |
ghc: | |
- "8.10.7" | |
- "9.0.2" | |
- "9.2.2" | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: haskell/actions/setup@v1 | |
name: Setup Haskell Stack | |
with: | |
ghc-version: ${{ matrix.ghc }} | |
stack-version: ${{ matrix.stack }} | |
- uses: actions/cache@v1 | |
name: Cache ~/.stack | |
with: | |
path: ~/.stack | |
key: ${{ runner.os }}-${{ matrix.ghc }}-stack | |
- name: Install dependencies | |
run: | | |
stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks --only-dependencies | |
- name: Build | |
run: | | |
stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks | |
- name: Test | |
run: | | |
stack test --system-ghc |