From 6d4e124de05d6fe571985343e7afb66055ca56dd Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Wed, 3 Sep 2025 10:49:25 -0400 Subject: [PATCH 1/4] fixup coverage handling with conditional macos-intel execution --- .github/workflows/test.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7c860bed1041..a8c222be3c16 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -185,10 +185,11 @@ jobs: collect-junit: false coverage: - if: github.repository_owner == 'Chia-Network' + if: always() && github.repository_owner == 'Chia-Network' name: ${{ matrix.os.emoji }} Coverage - ${{ matrix.python.name }} runs-on: ${{ matrix.os.runs-on }} needs: + - configure - macos-intel - macos-arm - ubuntu @@ -209,6 +210,11 @@ jobs: matrix: "3.10" steps: + - uses: re-actors/alls-green@release/v1.2.2 + with: + allowed-skips: ${{ needs.configure.outputs.mac_intel != 'true' && 'macos-intel' || '' }} + jobs: ${{ toJSON(needs) }} + - uses: actions/checkout@v5 with: fetch-depth: 0 From 19a1097ca5e35fa96e436d9a932eb13c05c9852a Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Wed, 3 Sep 2025 11:04:56 -0400 Subject: [PATCH 2/4] more mess. for the moment at least --- .github/workflows/test.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a8c222be3c16..93b7f0ed381e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -211,6 +211,7 @@ jobs: steps: - uses: re-actors/alls-green@release/v1.2.2 + id: alls-green with: allowed-skips: ${{ needs.configure.outputs.mac_intel != 'true' && 'macos-intel' || '' }} jobs: ${{ toJSON(needs) }} @@ -271,13 +272,13 @@ jobs: - uses: chia-network/actions/activate-venv@main - name: Add time out assert results to workflow summary - if: always() && false + if: always() && steps.alls-green.outputs.success == 'true' && false run: | 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" 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 - name: Publish JUnit results - if: always() && false + if: always() && steps.alls-green.outputs.success == 'true' && false uses: actions/upload-artifact@v4 with: name: junit-results @@ -291,18 +292,18 @@ jobs: coverage html --rcfile=.coveragerc --data-file=coverage-reports/.coverage --directory coverage-reports/html/ - uses: coverallsapp/github-action@v2 - if: always() + if: always() && steps.alls-green.outputs.success == 'true' env: COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} - name: Coverage report (chia/) - if: always() + if: always() && steps.alls-green.outputs.success == 'true' run: | set -o pipefail coverage report --rcfile=.coveragerc --data-file=coverage-reports/.coverage --include='chia/**/*' --omit='chia/_tests/**/*' --show-missing | tee coverage-reports/coverage-chia-stdout - name: Coverage report (chia/_tests/) - if: always() + if: always() && steps.alls-green.outputs.success == 'true' run: | set -o pipefail coverage report --rcfile=.coveragerc --data-file=coverage-reports/.coverage --include='chia/_tests/**/*' --show-missing | tee coverage-reports/coverage-tests-stdout @@ -313,7 +314,7 @@ jobs: echo "hash=$(git rev-parse HEAD~1)" >> "$GITHUB_OUTPUT" - name: Coverage report (diff) - if: (github.base_ref != '' || github.event.before != '') && always() + if: (github.base_ref != '' || github.event.before != '') && always() && steps.alls-green.outputs.success == 'true' env: compare-branch: ${{ github.base_ref == '' && steps.parent-commit.outputs.hash || format('origin/{0}', github.base_ref) }} run: | @@ -326,7 +327,7 @@ jobs: fi - name: Remove previous coverage report comment and label from PR - if: github.base_ref != '' && always() + if: github.base_ref != '' && always() && steps.alls-green.outputs.success == 'true' shell: bash env: COV_STATUS: ${{ env.COV_STATUS }} @@ -347,7 +348,7 @@ jobs: fi - name: Add diff coverage report comment to PR - if: github.base_ref != '' && always() + if: github.base_ref != '' && always() && steps.alls-green.outputs.success == 'true' env: BRANCH_NAME: ${{ github.sha }} COV_STATUS: ${{ env.COV_STATUS }} @@ -397,12 +398,12 @@ jobs: fi - name: Add diff coverage report to workflow summary - if: (github.base_ref != '' || github.event.before != '') && always() + if: (github.base_ref != '' || github.event.before != '') && always() && steps.alls-green.outputs.success == 'true' run: | cat coverage-reports/diff-cover.md >> "$GITHUB_STEP_SUMMARY" - name: Publish coverage reports - if: always() + if: always() && steps.alls-green.outputs.success == 'true' uses: actions/upload-artifact@v4 with: name: coverage-reports From 9f6435d6bebf7995f3e8a62b12cdac9e54addc7c Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Wed, 3 Sep 2025 11:10:22 -0400 Subject: [PATCH 3/4] let a few local-only steps run regardless --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 93b7f0ed381e..4632051a83c6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -297,13 +297,13 @@ jobs: COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} - name: Coverage report (chia/) - if: always() && steps.alls-green.outputs.success == 'true' + if: always() run: | set -o pipefail coverage report --rcfile=.coveragerc --data-file=coverage-reports/.coverage --include='chia/**/*' --omit='chia/_tests/**/*' --show-missing | tee coverage-reports/coverage-chia-stdout - name: Coverage report (chia/_tests/) - if: always() && steps.alls-green.outputs.success == 'true' + if: always() run: | set -o pipefail coverage report --rcfile=.coveragerc --data-file=coverage-reports/.coverage --include='chia/_tests/**/*' --show-missing | tee coverage-reports/coverage-tests-stdout @@ -314,7 +314,7 @@ jobs: echo "hash=$(git rev-parse HEAD~1)" >> "$GITHUB_OUTPUT" - name: Coverage report (diff) - if: (github.base_ref != '' || github.event.before != '') && always() && steps.alls-green.outputs.success == 'true' + if: (github.base_ref != '' || github.event.before != '') && always() env: compare-branch: ${{ github.base_ref == '' && steps.parent-commit.outputs.hash || format('origin/{0}', github.base_ref) }} run: | From bc78cbb518c27c4d53984e5bf0027824aec82fc7 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Wed, 3 Sep 2025 13:51:42 -0400 Subject: [PATCH 4/4] correct the version --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4632051a83c6..24cf857b6881 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -210,7 +210,7 @@ jobs: matrix: "3.10" steps: - - uses: re-actors/alls-green@release/v1.2.2 + - uses: re-actors/alls-green@release/v1.2 id: alls-green with: allowed-skips: ${{ needs.configure.outputs.mac_intel != 'true' && 'macos-intel' || '' }}