From 6de85aef536063601d6199f65588b2fb08accdb0 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Mon, 15 Sep 2025 13:26:54 -0400 Subject: [PATCH 01/10] just one --- .github/workflows/test.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 829eac8879f7..77756738904b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -94,7 +94,7 @@ jobs: - name: Generate matrix configuration id: configure run: | - python chia/_tests/build-job-matrix.py --per directory --verbose ${{ inputs.only && format('--only {0}', inputs.only) || '' }} ${{ inputs.duplicates > 1 && format('--duplicates {0}', inputs.duplicates) || '' }} ${{ inputs.build-job-matrix-arguments }} > matrix.json + python chia/_tests/build-job-matrix.py --duplicates 5 --per --only wallet/rpc/test_wallet_rpc.py --verbose ${{ inputs.build-job-matrix-arguments }} > matrix.json cat matrix.json echo "configuration=$(cat matrix.json)" >> "$GITHUB_OUTPUT" echo matrix_mode=${{ @@ -126,7 +126,7 @@ jobs: mac_intel: ${{ steps.macintel.outputs.mac_intel }} macos-intel: - if: needs.configure.outputs.mac_intel == 'true' + if: false && needs.configure.outputs.mac_intel == 'true' uses: ./.github/workflows/test-single.yml needs: configure with: @@ -141,7 +141,7 @@ jobs: arch: intel arch-emoji: 🌀 macos-arm: - if: github.event_name != 'workflow_dispatch' || inputs.run-macos-arm + if: false && github.event_name != 'workflow_dispatch' || inputs.run-macos-arm uses: ./.github/workflows/test-single.yml needs: configure with: @@ -157,7 +157,7 @@ jobs: arch-emoji: 💪 collect-junit: false ubuntu-intel: - if: github.event_name != 'workflow_dispatch' || inputs.run-linux-intel + if: false && github.event_name != 'workflow_dispatch' || inputs.run-linux-intel uses: ./.github/workflows/test-single.yml needs: configure with: @@ -173,7 +173,7 @@ jobs: arch-emoji: 🌀 collect-junit: false ubuntu-arm: - if: github.event_name != 'workflow_dispatch' || inputs.run-linux-arm + if: false && github.event_name != 'workflow_dispatch' || inputs.run-linux-arm uses: ./.github/workflows/test-single.yml needs: configure with: From 664b49b74ab62675070abbbc8f741cf67cadd22c Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Mon, 15 Sep 2025 13:28:54 -0400 Subject: [PATCH 02/10] oops --- .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 77756738904b..e82714378a88 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -94,7 +94,7 @@ jobs: - name: Generate matrix configuration id: configure run: | - python chia/_tests/build-job-matrix.py --duplicates 5 --per --only wallet/rpc/test_wallet_rpc.py --verbose ${{ inputs.build-job-matrix-arguments }} > matrix.json + python chia/_tests/build-job-matrix.py --duplicates 5 --per file --only wallet/rpc/test_wallet_rpc.py --verbose ${{ inputs.build-job-matrix-arguments }} > matrix.json cat matrix.json echo "configuration=$(cat matrix.json)" >> "$GITHUB_OUTPUT" echo matrix_mode=${{ From 3cc768893ae41353f6f59aee3ceecec392efcb8b Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Mon, 15 Sep 2025 13:37:43 -0400 Subject: [PATCH 03/10] oh yeah, 3.13 --- .github/workflows/test-single.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/test-single.yml b/.github/workflows/test-single.yml index c55522612047..5b282006b270 100644 --- a/.github/workflows/test-single.yml +++ b/.github/workflows/test-single.yml @@ -111,9 +111,6 @@ jobs: apt: "3.13" install_sh: "3.13" matrix: "3.13" - exclude_from: - limited: True - main: True exclude: - arch: matrix: arm From 21f1cd89f9d29b2abcbfb7397c47c83a86cdc35d Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Mon, 15 Sep 2025 14:03:08 -0400 Subject: [PATCH 04/10] backtrace --- .github/workflows/test-single.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-single.yml b/.github/workflows/test-single.yml index 5b282006b270..8fd5b84bc2ef 100644 --- a/.github/workflows/test-single.yml +++ b/.github/workflows/test-single.yml @@ -258,8 +258,9 @@ jobs: - name: Test blockchain code with pytest env: ENABLE_PYTEST_MONITOR: ${{ matrix.os.matrix == 'ubuntu' && matrix.configuration.enable_pytest_monitor || '' }} + RUST_BACKTRACE: full run: | - pytest --cov=chia --cov-config=.coveragerc --cov-report= -o 'junit_suite_name=${{ env.JOB_FILE_NAME }}' --junitxml='junit-data/junit.${{ env.JOB_FILE_NAME }}.xml' --durations=10 ${{ matrix.configuration.pytest_parallel_args[matrix.os.matrix] }} -m "not benchmark" ${{ env.ENABLE_PYTEST_MONITOR }} ${{ matrix.configuration.test_files }} + pytest --capture no -n 0 --cov=chia --cov-config=.coveragerc --cov-report= -o 'junit_suite_name=${{ env.JOB_FILE_NAME }}' --junitxml='junit-data/junit.${{ env.JOB_FILE_NAME }}.xml' --durations=10 -m "not benchmark" ${{ env.ENABLE_PYTEST_MONITOR }} ${{ matrix.configuration.test_files }} - name: Move back to chia/ for coverage run: | From e6c8f5717d4bb1708209256455a2f6b2cc1e5ffb Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Tue, 16 Sep 2025 12:26:02 -0400 Subject: [PATCH 05/10] Add configuration settings for RPC tests --- chia/_tests/rpc/config.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 chia/_tests/rpc/config.py diff --git a/chia/_tests/rpc/config.py b/chia/_tests/rpc/config.py new file mode 100644 index 000000000000..36e33694be60 --- /dev/null +++ b/chia/_tests/rpc/config.py @@ -0,0 +1,13 @@ +from __future__ import annotations + +from typing import Literal, Union + +# Defaults are conservative. +parallel: Union[bool, int, Literal["auto"]] = False +checkout_blocks_and_plots = False +install_timelord = False +# NOTE: do not use until the hangs are fixed +# https://github.com/CFMTech/pytest-monitor/issues/53 +# https://github.com/pythonprofilers/memory_profiler/issues/342 +check_resource_usage = False +job_timeout = 90 From 5dd5955de00d1007fbb4ccd69781215e6abb492a Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Tue, 16 Sep 2025 13:23:38 -0400 Subject: [PATCH 06/10] Set job timeout to 90 minutes in workflow --- .github/workflows/test-single.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-single.yml b/.github/workflows/test-single.yml index 8fd5b84bc2ef..12146515474d 100644 --- a/.github/workflows/test-single.yml +++ b/.github/workflows/test-single.yml @@ -55,7 +55,7 @@ jobs: test: name: ${{ matrix.os.emoji }} ${{ matrix.arch.emoji }} ${{ matrix.configuration.name }} - ${{ matrix.python.name }} runs-on: ${{ matrix.os.runs-on }} - timeout-minutes: ${{ matrix.configuration.job_timeout }} + timeout-minutes: 90 strategy: fail-fast: false matrix: From f0d2166be553f6ff733d7efbc2cfb0c97cce97ba Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Wed, 17 Sep 2025 15:43:05 -0400 Subject: [PATCH 07/10] Increase pytest parallelism from 0 to 4 --- .github/workflows/test-single.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-single.yml b/.github/workflows/test-single.yml index 12146515474d..e338d7914d14 100644 --- a/.github/workflows/test-single.yml +++ b/.github/workflows/test-single.yml @@ -260,7 +260,7 @@ jobs: ENABLE_PYTEST_MONITOR: ${{ matrix.os.matrix == 'ubuntu' && matrix.configuration.enable_pytest_monitor || '' }} RUST_BACKTRACE: full run: | - pytest --capture no -n 0 --cov=chia --cov-config=.coveragerc --cov-report= -o 'junit_suite_name=${{ env.JOB_FILE_NAME }}' --junitxml='junit-data/junit.${{ env.JOB_FILE_NAME }}.xml' --durations=10 -m "not benchmark" ${{ env.ENABLE_PYTEST_MONITOR }} ${{ matrix.configuration.test_files }} + pytest --capture no -n 4 --cov=chia --cov-config=.coveragerc --cov-report= -o 'junit_suite_name=${{ env.JOB_FILE_NAME }}' --junitxml='junit-data/junit.${{ env.JOB_FILE_NAME }}.xml' --durations=10 -m "not benchmark" ${{ env.ENABLE_PYTEST_MONITOR }} ${{ matrix.configuration.test_files }} - name: Move back to chia/ for coverage run: | From 7b61c36764e8363380577e65cbf153a2bbd7c22a Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Fri, 19 Sep 2025 14:21:55 -0400 Subject: [PATCH 08/10] Update Windows runner version to windows-2022 --- .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 e82714378a88..cdb0d044bcfa 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -200,7 +200,7 @@ jobs: concurrency-name: windows configuration: ${{ needs.configure.outputs.configuration }} matrix_mode: ${{ needs.configure.outputs.matrix_mode }} - runs-on: windows-latest + runs-on: windows-2022 arch: intel arch-emoji: 🌀 collect-junit: false From f3fea7abfd922896ad4d300677c599bdd7a31698 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Fri, 19 Sep 2025 14:24:27 -0400 Subject: [PATCH 09/10] Update Windows job configurations in test workflow --- .github/workflows/test.yml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cdb0d044bcfa..b836c41db4c3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -188,7 +188,7 @@ jobs: arch: arm arch-emoji: 💪 collect-junit: false - windows: + windows-2022: if: github.event_name != 'workflow_dispatch' || inputs.run-windows uses: ./.github/workflows/test-single.yml needs: configure @@ -196,14 +196,30 @@ jobs: os-emoji: 🪟 matrix: windows name: Windows - file_name: windows - concurrency-name: windows + file_name: windows-2022 + concurrency-name: windows-2022 configuration: ${{ needs.configure.outputs.configuration }} matrix_mode: ${{ needs.configure.outputs.matrix_mode }} runs-on: windows-2022 arch: intel arch-emoji: 🌀 collect-junit: false + windows-2025: + if: github.event_name != 'workflow_dispatch' || inputs.run-windows + uses: ./.github/workflows/test-single.yml + needs: configure + with: + os-emoji: 🪟 + matrix: windows + name: Windows + file_name: windows-2025 + concurrency-name: windows-2025 + configuration: ${{ needs.configure.outputs.configuration }} + matrix_mode: ${{ needs.configure.outputs.matrix_mode }} + runs-on: windows-2025 + arch: intel + arch-emoji: 🌀 + collect-junit: false coverage: if: always() && github.repository_owner == 'Chia-Network' From 60a33328e9ec1e38f24dff380b37fbb8df6ae07b Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Fri, 19 Sep 2025 14:26:50 -0400 Subject: [PATCH 10/10] Disable coverage steps in test workflow Commented out coverage-related steps in the workflow. --- .github/workflows/test.yml | 452 ++++++++++++++++++------------------- 1 file changed, 226 insertions(+), 226 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b836c41db4c3..7dedb6507021 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -221,229 +221,229 @@ jobs: arch-emoji: 🌀 collect-junit: false - coverage: - 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-intel - - ubuntu-arm - - windows - strategy: - fail-fast: false - matrix: - os: - - emoji: 🐧 - matrix: ubuntu - name: Ubuntu - runs-on: ubuntu-latest - python: - - name: "3.10" - action: "3.10" - apt: "3.10" - install_sh: "3.10" - matrix: "3.10" - - steps: - - uses: re-actors/alls-green@release/v1.2 - id: alls-green - with: - allowed-skips: ${{ needs.configure.outputs.mac_intel != 'true' && 'macos-intel' || '' }} - jobs: ${{ toJSON(needs) }} - - - uses: actions/checkout@v5 - with: - fetch-depth: 0 - - - name: Set Env - uses: Chia-Network/actions/setjobenv@main - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Download Results - if: false - uses: actions/download-artifact@v4 - with: - merge-multiple: true - pattern: junit-data-* - path: junit-data - - - name: Format JUnit data and prepare results - if: false - run: | - sudo snap install yq - find junit-data -maxdepth 1 -name '*.xml' -print0 | xargs -0 --max-procs=10 --replace={} yq eval '.testsuites.testsuite.testcase |= sort_by(.+@classname, .+@name)' --inplace {} - - sudo apt-get install junitparser - mkdir junit-results - junitparser merge junit-data/*.xml junit-results/junit.xml - find junit-results -maxdepth 1 -name '*.xml' -print0 | xargs -0 --max-procs=10 --replace={} yq eval '.testsuites.testsuite |= sort_by(.+@name) | .testsuites.testsuite[].testcase |= sort_by(.+@classname, .+@name)' --inplace {} - - - name: Publish formatted JUnit data - if: false - uses: actions/upload-artifact@v4 - with: - name: junit-data - path: junit-data/* - if-no-files-found: error - - - name: Download Coverage - uses: actions/download-artifact@v4 - with: - merge-multiple: true - pattern: coverage-data-* - path: coverage-data - - - name: Set up ${{ matrix.python.name }} - uses: Chia-Network/actions/setup-python@main - with: - python-version: ${{ matrix.python.action }} - - - uses: ./.github/actions/install - with: - python-version: ${{ matrix.python.action }} - development: true - - - uses: chia-network/actions/activate-venv@main - - - name: Add time out assert results to workflow summary - 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() && steps.alls-green.outputs.success == 'true' && false - uses: actions/upload-artifact@v4 - with: - name: junit-results - path: junit-results/* - if-no-files-found: error - - - name: Coverage Processing - run: | - coverage combine --rcfile=.coveragerc --data-file=coverage-reports/.coverage coverage-data/ - coverage xml --rcfile=.coveragerc --data-file=coverage-reports/.coverage -o coverage-reports/coverage.xml - coverage html --rcfile=.coveragerc --data-file=coverage-reports/.coverage --directory coverage-reports/html/ - - - uses: coverallsapp/github-action@v2 - if: always() && steps.alls-green.outputs.success == 'true' - env: - COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} - - - name: Coverage report (chia/) - 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() && 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 - - - name: Identify parent commit - id: parent-commit - run: | - 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' - env: - compare-branch: ${{ github.base_ref == '' && steps.parent-commit.outputs.hash || format('origin/{0}', github.base_ref) }} - run: | - set -o pipefail - diff-cover --config-file=.diffcover.toml --compare-branch=${{ env.compare-branch }} --fail-under=100 --html-report=coverage-reports/diff-cover.html --markdown-report=coverage-reports/diff-cover.md coverage-reports/coverage.xml | tee coverage-reports/diff-cover-stdout - COV_STATUS="${PIPESTATUS[0]}" - echo "COV_STATUS=$COV_STATUS" >> "$GITHUB_ENV" - if [[ $COV_STATUS != '0' && "$GITHUB_BASE_REF" != '' ]]; then - exit 1 - fi - - - name: Remove previous coverage report comment and label from PR - if: github.base_ref != '' && always() && steps.alls-green.outputs.success == 'true' - shell: bash - env: - COV_STATUS: ${{ env.COV_STATUS }} - GH_TOKEN: ${{ github.token }} - ORG_REPO: ${{ github.repository }} - run: | - PR_NUM=$(jq -r '.number' "$GITHUB_EVENT_PATH") - COMMENTS=$(gh api -X GET /repos/"${ORG_REPO}"/issues/"${PR_NUM}"/comments) - COMMENT_ID=$(echo "$COMMENTS" | jq '.[] | select(.user.login == "github-actions[bot]" and (.body | tostring | contains(""))) | .id') - COVERAGE_LABEL=$(gh pr view "$PR_NUM" --json labels --jq ' .labels[].name | select(. == "coverage-diff")') - if [[ -n "$COMMENT_ID" ]]; then - gh api -X DELETE /repos/"${ORG_REPO}"/issues/comments/"${COMMENT_ID}" - fi - if [[ "$COV_STATUS" == '0' ]]; then - if [[ "$COVERAGE_LABEL" == "coverage-diff" ]]; then - gh pr edit "$PR_NUM" --remove-label "coverage-diff" - fi - fi - - - name: Add diff coverage report comment to PR - if: github.base_ref != '' && always() && steps.alls-green.outputs.success == 'true' - env: - BRANCH_NAME: ${{ github.sha }} - COV_STATUS: ${{ env.COV_STATUS }} - GH_TOKEN: ${{ github.token }} - ORG_REPO: ${{ github.repository }} - run: | - if [[ $COV_STATUS != '0' ]]; then - BASE_URL="https://github.com/${ORG_REPO}/blob/${BRANCH_NAME}" - PR_NUM=$(jq -r '.number' "$GITHUB_EVENT_PATH") - COVERAGE_LABEL=$(gh pr view "$PR_NUM" --json labels --jq ' .labels[].name | select(. == "coverage-diff")') - CONTENT=$( temp_comment.txt - gh pr comment "$PR_NUM" -F temp_comment.txt - if [[ $COVERAGE_LABEL != "coverage-diff" ]]; then - gh pr edit "$PR_NUM" --add-label "coverage-diff" - fi - fi - - - name: Add diff coverage report to workflow summary - 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() && steps.alls-green.outputs.success == 'true' - uses: actions/upload-artifact@v4 - with: - name: coverage-reports - path: coverage-reports/* - if-no-files-found: error + # coverage: + # 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-intel + # - ubuntu-arm + # - windows + # strategy: + # fail-fast: false + # matrix: + # os: + # - emoji: 🐧 + # matrix: ubuntu + # name: Ubuntu + # runs-on: ubuntu-latest + # python: + # - name: "3.10" + # action: "3.10" + # apt: "3.10" + # install_sh: "3.10" + # matrix: "3.10" + + # steps: + # - uses: re-actors/alls-green@release/v1.2 + # id: alls-green + # with: + # allowed-skips: ${{ needs.configure.outputs.mac_intel != 'true' && 'macos-intel' || '' }} + # jobs: ${{ toJSON(needs) }} + + # - uses: actions/checkout@v5 + # with: + # fetch-depth: 0 + + # - name: Set Env + # uses: Chia-Network/actions/setjobenv@main + # env: + # GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # - name: Download Results + # if: false + # uses: actions/download-artifact@v4 + # with: + # merge-multiple: true + # pattern: junit-data-* + # path: junit-data + + # - name: Format JUnit data and prepare results + # if: false + # run: | + # sudo snap install yq + # find junit-data -maxdepth 1 -name '*.xml' -print0 | xargs -0 --max-procs=10 --replace={} yq eval '.testsuites.testsuite.testcase |= sort_by(.+@classname, .+@name)' --inplace {} + + # sudo apt-get install junitparser + # mkdir junit-results + # junitparser merge junit-data/*.xml junit-results/junit.xml + # find junit-results -maxdepth 1 -name '*.xml' -print0 | xargs -0 --max-procs=10 --replace={} yq eval '.testsuites.testsuite |= sort_by(.+@name) | .testsuites.testsuite[].testcase |= sort_by(.+@classname, .+@name)' --inplace {} + + # - name: Publish formatted JUnit data + # if: false + # uses: actions/upload-artifact@v4 + # with: + # name: junit-data + # path: junit-data/* + # if-no-files-found: error + + # - name: Download Coverage + # uses: actions/download-artifact@v4 + # with: + # merge-multiple: true + # pattern: coverage-data-* + # path: coverage-data + + # - name: Set up ${{ matrix.python.name }} + # uses: Chia-Network/actions/setup-python@main + # with: + # python-version: ${{ matrix.python.action }} + + # - uses: ./.github/actions/install + # with: + # python-version: ${{ matrix.python.action }} + # development: true + + # - uses: chia-network/actions/activate-venv@main + + # - name: Add time out assert results to workflow summary + # 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() && steps.alls-green.outputs.success == 'true' && false + # uses: actions/upload-artifact@v4 + # with: + # name: junit-results + # path: junit-results/* + # if-no-files-found: error + + # - name: Coverage Processing + # run: | + # coverage combine --rcfile=.coveragerc --data-file=coverage-reports/.coverage coverage-data/ + # coverage xml --rcfile=.coveragerc --data-file=coverage-reports/.coverage -o coverage-reports/coverage.xml + # coverage html --rcfile=.coveragerc --data-file=coverage-reports/.coverage --directory coverage-reports/html/ + + # - uses: coverallsapp/github-action@v2 + # if: always() && steps.alls-green.outputs.success == 'true' + # env: + # COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} + + # - name: Coverage report (chia/) + # 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() && 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 + + # - name: Identify parent commit + # id: parent-commit + # run: | + # 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' + # env: + # compare-branch: ${{ github.base_ref == '' && steps.parent-commit.outputs.hash || format('origin/{0}', github.base_ref) }} + # run: | + # set -o pipefail + # diff-cover --config-file=.diffcover.toml --compare-branch=${{ env.compare-branch }} --fail-under=100 --html-report=coverage-reports/diff-cover.html --markdown-report=coverage-reports/diff-cover.md coverage-reports/coverage.xml | tee coverage-reports/diff-cover-stdout + # COV_STATUS="${PIPESTATUS[0]}" + # echo "COV_STATUS=$COV_STATUS" >> "$GITHUB_ENV" + # if [[ $COV_STATUS != '0' && "$GITHUB_BASE_REF" != '' ]]; then + # exit 1 + # fi + + # - name: Remove previous coverage report comment and label from PR + # if: github.base_ref != '' && always() && steps.alls-green.outputs.success == 'true' + # shell: bash + # env: + # COV_STATUS: ${{ env.COV_STATUS }} + # GH_TOKEN: ${{ github.token }} + # ORG_REPO: ${{ github.repository }} + # run: | + # PR_NUM=$(jq -r '.number' "$GITHUB_EVENT_PATH") + # COMMENTS=$(gh api -X GET /repos/"${ORG_REPO}"/issues/"${PR_NUM}"/comments) + # COMMENT_ID=$(echo "$COMMENTS" | jq '.[] | select(.user.login == "github-actions[bot]" and (.body | tostring | contains(""))) | .id') + # COVERAGE_LABEL=$(gh pr view "$PR_NUM" --json labels --jq ' .labels[].name | select(. == "coverage-diff")') + # if [[ -n "$COMMENT_ID" ]]; then + # gh api -X DELETE /repos/"${ORG_REPO}"/issues/comments/"${COMMENT_ID}" + # fi + # if [[ "$COV_STATUS" == '0' ]]; then + # if [[ "$COVERAGE_LABEL" == "coverage-diff" ]]; then + # gh pr edit "$PR_NUM" --remove-label "coverage-diff" + # fi + # fi + + # - name: Add diff coverage report comment to PR + # if: github.base_ref != '' && always() && steps.alls-green.outputs.success == 'true' + # env: + # BRANCH_NAME: ${{ github.sha }} + # COV_STATUS: ${{ env.COV_STATUS }} + # GH_TOKEN: ${{ github.token }} + # ORG_REPO: ${{ github.repository }} + # run: | + # if [[ $COV_STATUS != '0' ]]; then + # BASE_URL="https://github.com/${ORG_REPO}/blob/${BRANCH_NAME}" + # PR_NUM=$(jq -r '.number' "$GITHUB_EVENT_PATH") + # COVERAGE_LABEL=$(gh pr view "$PR_NUM" --json labels --jq ' .labels[].name | select(. == "coverage-diff")') + # CONTENT=$( temp_comment.txt + # gh pr comment "$PR_NUM" -F temp_comment.txt + # if [[ $COVERAGE_LABEL != "coverage-diff" ]]; then + # gh pr edit "$PR_NUM" --add-label "coverage-diff" + # fi + # fi + + # - name: Add diff coverage report to workflow summary + # 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() && steps.alls-green.outputs.success == 'true' + # uses: actions/upload-artifact@v4 + # with: + # name: coverage-reports + # path: coverage-reports/* + # if-no-files-found: error