Skip to content

Commit d16b47f

Browse files
wip
1 parent 18c7295 commit d16b47f

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ jobs:
3939

4040
runs-on: ubuntu-latest
4141

42+
env:
43+
coverage: ${{ github.event.pull_request && matrix.ghc_version == env.latest_ghc }}
44+
4245
steps:
4346
- uses: actions/checkout@v4
4447
with:
@@ -57,7 +60,7 @@ jobs:
5760
.hpc
5861
restore-keys: ${{ matrix.ghc-version }}-
5962

60-
- if: ${{ github.event.pull_request and matrix.ghc_version == env.latest_ghc }}
63+
- if: ${{ env.coverage }}
6164
run: |
6265
cat <<EOF >>cabal.project.local
6366
program-options
@@ -72,18 +75,18 @@ jobs:
7275
# one in this PR. This is important in order to get the same
7376
# coverage-counting logic on the PR as on master.
7477
- uses: actions/checkout@v4
75-
if: ${{ github.event.pull_request and matrix.ghc_version == env.latest_ghc }}
78+
if: ${{ env.coverage }}
7679
with:
7780
ref: ${{ github.head_ref }}
7881
sparse-checkout:
7982
scripts
8083
clean: false
8184

82-
- if: ${{ github.event.pull_request and matrix.ghc_version == env.latest_ghc }}
85+
- if: ${{ env.coverage }}
8386
run: ./scripts/generate-coverage-comment.sh constrained.tix | tee coverage-report-${{matrix.ref}}.md
8487

8588
- name: Upload coverage report
86-
if: ${{ github.event.pull_request and matrix.ghc_version == env.latest_ghc }}
89+
if: ${{ env.coverage }}
8790
uses: actions/upload-artifact@v4
8891
with:
8992
name: constrained-${{matrix.ref}}-coverage

0 commit comments

Comments
 (0)