Skip to content

Basic code coverage feedback #22

Basic code coverage feedback

Basic code coverage feedback #22

Workflow file for this run

name: Haskell-CI
on:
push:
branches:
- 'master'
pull_request:
branches:
- 'master'
schedule:
- cron: 0 0 * * *
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
linux:
name: Haskell-CI - Linux - ${{ matrix.ghc-version }}
strategy:
matrix:
ghc-version: [latest, 9.12, "9.10", 9.8, 9.6]
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: haskell-actions/setup@v2
with:
ghc-version: ${{matrix.ghc-version}}
- uses: actions/cache/restore@v4
with:
key: ${{ matrix.ghc-version }}-${{ github.sha }}
path: ~/.cabal/store
restore-keys: ${{ matrix.ghc-version }}-
- run: cabal build all
- run: cabal test all --ghc-options=-fhpc
- run: mv constrained.tix constrained-${{matrix.ghc-version}}.tix
- run: cabal haddock all
- uses: actions/cache/save@v4
with:
key: ${{ matrix.ghc-version }}-${{ github.sha }}
path: ~/.cabal/store
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: constrained-${{matrix.ghc-version}}-coverage
path: constrained-${{ matrix.ghc-version }}.tix
if-no-files-found: error
compression-level: 0
retention-days: 1
- name: Find Comment
if: github.event.pull_request && ${{matrix.ghc-version}} == latest
uses: peter-evans/find-comment@v3
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: "expressions used"
- name: Create or update comment
if: github.event.pull_request && ${{matrix.ghc-version}} == latest
uses: peter-evans/create-or-update-comment@v4
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: report.md
edit-mode: replace