rusackas commented on code in PR #42503: URL: https://github.com/apache/superset/pull/42503#discussion_r3707262808
########## .github/workflows/superset-python-unittest-report.yml: ########## @@ -0,0 +1,65 @@ +name: Python Unit Test Results + +on: + # zizmor: ignore[dangerous-triggers] - runs in base-branch context and only consumes artifacts uploaded by Python-Unit; never checks out PR code (see note below) + workflow_run: + workflows: ["Python-Unit"] + types: [completed] + +# This workflow publishes a check run annotating failing Python unit tests +# inline on the PR diff, using JUnit XML uploaded by the Python-Unit workflow. +# It uses the workflow_run trigger so that it always runs in the base-branch +# context and can safely be granted write permissions, even for PRs from +# forks or Dependabot. +# +# IMPORTANT: This workflow must NEVER check out code from the PR branch. All +# data comes from artifacts uploaded by the Python-Unit workflow. +permissions: + contents: read + checks: write + issues: read + actions: read + +jobs: + report: + runs-on: ubuntu-26.04 + timeout-minutes: 10 + if: > + github.event.workflow_run.conclusion == 'success' || + github.event.workflow_run.conclusion == 'failure' + steps: + # Fails soft (continue-on-error) because the source unit-tests job is + # itself gated on change detection: a docs-only PR skips it entirely, + # so there is nothing to download or report on. + - name: Download JUnit results + id: download + continue-on-error: true + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 + with: + pattern: "junit-results-*" + path: artifacts + merge-multiple: true Review Comment: Good catch, thanks. On push builds both matrix legs run and their XMLs share filenames, so `merge-multiple: true` was letting one Python version clobber the other in `artifacts/`. Dropped `merge-multiple` in 399937a so each artifact download lands in its own subdirectory; the existing `artifacts/**/*.xml` glob is already recursive so it still picks up everything. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
