Skip to content

Commit 1600703

Browse files
authored
fixup coverage handling with conditional macos-intel execution (#20026)
* fixup coverage handling with conditional macos-intel execution * more mess. for the moment at least * let a few local-only steps run regardless * correct the version
1 parent cd792f5 commit 1600703

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

.github/workflows/test.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,11 @@ jobs:
185185
collect-junit: false
186186

187187
coverage:
188-
if: github.repository_owner == 'Chia-Network'
188+
if: always() && github.repository_owner == 'Chia-Network'
189189
name: ${{ matrix.os.emoji }} Coverage - ${{ matrix.python.name }}
190190
runs-on: ${{ matrix.os.runs-on }}
191191
needs:
192+
- configure
192193
- macos-intel
193194
- macos-arm
194195
- ubuntu
@@ -209,6 +210,12 @@ jobs:
209210
matrix: "3.10"
210211

211212
steps:
213+
- uses: re-actors/alls-green@release/v1.2
214+
id: alls-green
215+
with:
216+
allowed-skips: ${{ needs.configure.outputs.mac_intel != 'true' && 'macos-intel' || '' }}
217+
jobs: ${{ toJSON(needs) }}
218+
212219
- uses: actions/checkout@v5
213220
with:
214221
fetch-depth: 0
@@ -265,13 +272,13 @@ jobs:
265272
- uses: chia-network/actions/activate-venv@main
266273

267274
- name: Add time out assert results to workflow summary
268-
if: always() && false
275+
if: always() && steps.alls-green.outputs.success == 'true' && false
269276
run: |
270277
python -m chia._tests.process_junit --limit 50 --type time_out_assert --xml junit-results/junit.xml --markdown --link-prefix ${{ github.event.repository.html_url }}/blob/${{ github.sha }}/ --link-line-separator \#L >> "$GITHUB_STEP_SUMMARY"
271278
python -m chia._tests.process_junit --type time_out_assert --xml junit-results/junit.xml --markdown --link-prefix ${{ github.event.repository.html_url }}/blob/${{ github.sha }}/ --link-line-separator \#L >> junit-results/time_out_assert.md
272279
273280
- name: Publish JUnit results
274-
if: always() && false
281+
if: always() && steps.alls-green.outputs.success == 'true' && false
275282
uses: actions/upload-artifact@v4
276283
with:
277284
name: junit-results
@@ -285,7 +292,7 @@ jobs:
285292
coverage html --rcfile=.coveragerc --data-file=coverage-reports/.coverage --directory coverage-reports/html/
286293
287294
- uses: coverallsapp/github-action@v2
288-
if: always()
295+
if: always() && steps.alls-green.outputs.success == 'true'
289296
env:
290297
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
291298

@@ -320,7 +327,7 @@ jobs:
320327
fi
321328
322329
- name: Remove previous coverage report comment and label from PR
323-
if: github.base_ref != '' && always()
330+
if: github.base_ref != '' && always() && steps.alls-green.outputs.success == 'true'
324331
shell: bash
325332
env:
326333
COV_STATUS: ${{ env.COV_STATUS }}
@@ -341,7 +348,7 @@ jobs:
341348
fi
342349
343350
- name: Add diff coverage report comment to PR
344-
if: github.base_ref != '' && always()
351+
if: github.base_ref != '' && always() && steps.alls-green.outputs.success == 'true'
345352
env:
346353
BRANCH_NAME: ${{ github.sha }}
347354
COV_STATUS: ${{ env.COV_STATUS }}
@@ -391,12 +398,12 @@ jobs:
391398
fi
392399
393400
- name: Add diff coverage report to workflow summary
394-
if: (github.base_ref != '' || github.event.before != '') && always()
401+
if: (github.base_ref != '' || github.event.before != '') && always() && steps.alls-green.outputs.success == 'true'
395402
run: |
396403
cat coverage-reports/diff-cover.md >> "$GITHUB_STEP_SUMMARY"
397404
398405
- name: Publish coverage reports
399-
if: always()
406+
if: always() && steps.alls-green.outputs.success == 'true'
400407
uses: actions/upload-artifact@v4
401408
with:
402409
name: coverage-reports

0 commit comments

Comments
 (0)