Skip to content

Commit bf518ac

Browse files
split coverage job out to make it easier to depend on just one report
1 parent 17f634d commit bf518ac

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
restore-keys: ${{ matrix.ghc-version }}-
3838
- run: cabal build all --ghc-options=-fhpc
3939
- run: cabal test all --ghc-options=-fhpc
40-
- run: hpc report constrained.tix > report.md
40+
- run: hpc report constrained.tix > coverage-report.md
4141
- run: cabal haddock all
4242
- uses: actions/cache/save@v4
4343
with:
@@ -48,13 +48,24 @@ jobs:
4848
uses: actions/upload-artifact@v4
4949
with:
5050
name: constrained-${{matrix.ghc-version}}-coverage
51-
path: constrained.tix
51+
path: coverage-report.md
5252
if-no-files-found: error
5353
compression-level: 0
5454
retention-days: 1
5555

56+
report:
57+
58+
depends-on: linux
59+
60+
if: github.event.pull_request
61+
62+
steps:
63+
- name: Download coverage report
64+
uses: actions/download-artifact@v4
65+
with:
66+
pattern: 'constrained-latest-coverage'
67+
5668
- name: Find Comment
57-
if: github.event.pull_request && ${{matrix.ghc-version}} == 'latest'
5869
uses: peter-evans/find-comment@v3
5970
id: fc
6071
with:
@@ -63,10 +74,9 @@ jobs:
6374
body-includes: "expressions used"
6475

6576
- name: Create or update comment
66-
if: github.event.pull_request && ${{matrix.ghc-version}} == 'latest'
6777
uses: peter-evans/create-or-update-comment@v4
6878
with:
6979
comment-id: ${{ steps.fc.outputs.comment-id }}
7080
issue-number: ${{ github.event.pull_request.number }}
71-
body-path: report.md
81+
body-path: coverage-report.md
7282
edit-mode: replace

0 commit comments

Comments
 (0)