Skip to content

Commit 0f6828b

Browse files
split logic into script
1 parent a05c130 commit 0f6828b

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ jobs:
4141
restore-keys: ${{ matrix.ghc-version }}-
4242
- run: cabal build all --ghc-options=-fhpc
4343
- run: cabal test all --ghc-options=-fhpc
44-
- run: hpc report constrained.tix > coverage-report.md
45-
- run: awk '{sub(/^[ \t]*/, "& - ")}1' coverage-report.md > coverage-report.md
44+
- run: ./scripts/generate-coverage-report.sh constrained.tix > coverage-report.md
4645
- run: cabal haddock all
4746
- uses: actions/cache/save@v4
4847
with:
@@ -74,7 +73,7 @@ jobs:
7473
pattern: 'constrained-latest-coverage'
7574
merge-multiple: true
7675

77-
- run: ls -lah
76+
- run: cat coverage-report.md
7877

7978
- name: Find Comment
8079
uses: peter-evans/find-comment@v3
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
3+
echo "# Coverage report"
4+
hpc report $1 | awk '{sub(/^[ \t]*/, "& - ")1; sub(/^ /, "", $0); print}'

0 commit comments

Comments
 (0)