1414 schedule :
1515 - cron : 0 0 * * *
1616
17+ env :
18+ latest_ghc : " 9.12"
19+
1720concurrency :
1821 group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1922 cancel-in-progress : true
5457 .hpc
5558 restore-keys : ${{ matrix.ghc-version }}-
5659
57- - if : ${{ github.event.pull_request }}
60+ - if : ${{ github.event.pull_request and matrix.ghc_version == env.latest_ghc }}
5861 run : |
5962 cat <<EOF >>cabal.project.local
6063 program-options
@@ -69,20 +72,21 @@ jobs:
6972 # one in this PR. This is important in order to get the same
7073 # coverage-counting logic on the PR as on master.
7174 - uses : actions/checkout@v4
75+ if : ${{ github.event.pull_request and matrix.ghc_version == env.latest_ghc }}
7276 with :
7377 ref : ${{ github.head_ref }}
7478 sparse-checkout :
7579 scripts
7680 clean : false
7781
78- - if : ${{ github.event.pull_request }}
82+ - if : ${{ github.event.pull_request and matrix.ghc_version == env.latest_ghc }}
7983 run : ./scripts/generate-coverage-comment.sh constrained.tix | tee coverage-report-${{matrix.ref}}.md
8084
8185 - name : Upload coverage report
82- if : ${{ github.event.pull_request }}
86+ if : ${{ github.event.pull_request and matrix.ghc_version == env.latest_ghc }}
8387 uses : actions/upload-artifact@v4
8488 with :
85- name : constrained-${{matrix.ref}}-${{matrix.ghc-version}}- coverage
89+ name : constrained-${{matrix.ref}}-coverage
8690 path : coverage-report-${{matrix.ref}}.md
8791 if-no-files-found : error
8892 compression-level : 0
@@ -101,13 +105,13 @@ jobs:
101105 - name : Download coverage report
102106 uses : actions/download-artifact@v4
103107 with :
104- pattern : ' constrained-${{github.head_ref}}-9.12- coverage'
108+ pattern : ' constrained-${{github.head_ref}}-coverage'
105109 merge-multiple : true
106110
107111 - name : Download coverage report from `master`
108112 uses : actions/download-artifact@v4
109113 with :
110- pattern : ' constrained-master-9.12- coverage'
114+ pattern : ' constrained-master-coverage'
111115 merge-multiple : true
112116
113117 - run : |
0 commit comments