Skip to content

feat(ci): use stack to setup ghc #38

feat(ci): use stack to setup ghc

feat(ci): use stack to setup ghc #38

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
fourmolu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: haskell-actions/run-fourmolu@v9
test:
name: GHC ${{ matrix.ghc-version }} on ${{ matrix.os }}
needs: fourmolu
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
ghc-version:
[
"9.8",
"9.6",
"9.4",
"9.2",
"9.0",
"8.10",
"8.8",
"8.6",
"8.4",
"8.2",
"8.0",
]
steps:
- uses: actions/checkout@v4
- name: Build
run: stack build --test --no-run-tests --compiler ghc-${{ matrix.ghc-version }}
- name: Test
run: stack test --compiler ghc-${{ matrix.ghc-version }}
haddock:
# Only run on pushes to main
if: github.ref == 'refs/heads/main'
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
name: Haddock
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up GHC 9.4
uses: haskell-actions/setup@v2
with:
ghc-version: "9.4"
enable-stack: true
stack-version: "latest"
- name: Prepare dependencies
run: cabal update
- name: Haddock
run: cabal haddock tasty-process --enable-doc --haddock-hyperlink-source --haddock-quickjump --haddock-html-location='https://hackage.haskell.org/package/$pkg-$version/docs'
- name: Prepare for deployment
run: cp -r ./$(find dist-newstyle -path '*/doc/html/tasty-process') site
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: "site"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4