Update supported GHC versions #44
Workflow file for this run
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: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
workflow_call: | |
jobs: | |
build_and_test: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
uses: actions/checkout@v3 | |
- | |
uses: actions/cache@v3 | |
with: | |
path: ~/.stack | |
key: ${{ runner.os }}-stack-cache-${{ hashFiles('stack.yaml', 'package.yaml') }} | |
- | |
name: Build + Test | |
run: stack test --ghc-options=-Werror --haddock --no-haddock-deps --coverage | |
- | |
name: Check that files are unmodified | |
run: git add -A && git diff --staged --exit-code | |
- | |
name: Convert coverage output | |
run: | | |
HPC_LCOV_VERSION=1.1.1 | |
curl -fsSL \ | |
"https://github.com/brandonchinn178/hpc-lcov/releases/download/v${HPC_LCOV_VERSION}/hpc-lcov-${HPC_LCOV_VERSION}-linux-x86_64" \ | |
-o /usr/local/bin/hpc-lcov | |
chmod +x /usr/local/bin/hpc-lcov | |
hpc-lcov | |
- | |
uses: codecov/codecov-action@v3 | |
with: | |
files: lcov.info | |
ghc_compat_test: | |
strategy: | |
matrix: | |
ghc_version: | |
- '9.4' | |
- '9.6' | |
- '9.8' | |
include: | |
- ghc_version: 9.4.1 | |
oldest: true | |
name: ghc_compat_test (${{ matrix.ghc_version }}) | |
uses: ./.github/workflows/ghc-compat-test.yml | |
with: | |
ghc_version: ${{ matrix.ghc_version }} | |
oldest: ${{ matrix.oldest || false }} | |
lint: | |
runs-on: ubuntu-latest | |
env: | |
FOURMOLU_VERSION: '0.12.0.0' | |
steps: | |
- | |
uses: actions/checkout@v3 | |
- | |
name: Install fourmolu | |
run: | | |
curl -fsSL \ | |
"https://github.com/fourmolu/fourmolu/releases/download/v${FOURMOLU_VERSION}/fourmolu-${FOURMOLU_VERSION}-linux-x86_64" \ | |
-o /usr/local/bin/fourmolu | |
chmod +x /usr/local/bin/fourmolu | |
- | |
name: Run fourmolu | |
run: fourmolu -m check . | |
benchmarks: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
uses: actions/checkout@v3 | |
- | |
uses: actions/cache@v3 | |
with: | |
path: ~/.stack | |
key: ${{ runner.os }}-benchmarks-${{ hashFiles('stack.yaml', 'package.yaml') }} | |
- | |
name: Run benchmarks | |
run: stack bench --ghc-options=-Werror --ba '--output=/tmp/benchmark-results.html' | |
- | |
uses: actions/upload-artifact@v3 | |
with: | |
name: benchmark-results | |
path: /tmp/benchmark-results.html | |
check_sdist: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
uses: actions/checkout@v3 | |
- | |
uses: actions/cache@v3 | |
with: | |
path: ~/.stack | |
key: ${{ runner.os }}-check_sdist-${{ hashFiles('stack.yaml', 'package.yaml') }} | |
- | |
name: Strip unreleased section from CHANGELOG | |
run: sed -i -n '/^# Unreleased/d; /^#/,$p' CHANGELOG.md | |
- | |
name: Create sdist bundle | |
run: stack sdist --test-tarball --tar-dir . | |
- | |
uses: actions/upload-artifact@v3 | |
with: | |
name: aeson-schemas-sdist | |
path: aeson-schemas-*.tar.gz |