Skip to content

fix(ci): download each project's JUnit into its own directory - #2828

Merged
cardoe merged 1 commit into
mainfrom
fix-junit-artifact-collision
Dec 1, 2026
Merged

cardoe merged 1 commit into
mainfrom
fix-junit-artifact-collision

Conversation

@cardoe

@cardoe cardoe commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

The "Python test results" check fails now and then with 0 tests and a parse error, even though every uv (...) test job passed. Seen on #2827:

Reading JUnit XML files junit/**/*.xml (1 file, 96.5 KiB)
ERROR - lxml.etree.XMLSyntaxError: Extra content at the end of the document, line 1, column 67273

Cause: publish-test-results downloaded every junit-* artifact with merge-multiple: true into one junit/ directory. Every project's file is named junit.xml and the artifacts download in parallel, so they overwrite each other into a single file. Depending on timing, that file can't be parsed. "Re-run failed jobs" can't clear it either, because the workflow run itself succeeded.

Fix: drop merge-multiple, so each artifact lands in junit/<artifact-name>/junit.xml. The existing junit/**/*.xml glob already finds them there, and coverage-upload handles its same-named coverage.xml files this way already. Also renames the deprecated junit_files input to files, which the action warns about on every run.

This PR changes the workflow file, so it runs the fixed publish job itself; the check should report every project's tests.

publish-test-results downloaded every junit-* artifact with
merge-multiple into one junit/ directory. Every project's file is named
junit.xml and the artifacts download in parallel, so they overwrote each
other into a single file, which could be left unparseable. The publish
action then reported 0 tests and failed the "Python test results"
check even though every test job passed, and re-running failed jobs
could not clear it because the run itself had succeeded.

Download each artifact into its own junit/<artifact-name>/ subdirectory,
as coverage-upload already does for coverage.xml; the existing
junit/**/*.xml glob finds them there. Also rename the deprecated
junit_files input to files.
@cardoe
cardoe enabled auto-merge December 1, 2026 00:21
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

Python test results

2 460 tests  +1 928   2 455 ✅ +1 923   1m 52s ⏱️ + 1m 48s
    7 suites +    6       5 💤 +    5 
    7 files   +    6       0 ❌ ±    0 

Results for commit effabd6. ± Comparison against base commit 3de43af.

@cardoe
cardoe added this pull request to the merge queue Dec 1, 2026
Merged via the queue into main with commit 0d9abcf Dec 1, 2026
31 checks passed
@cardoe
cardoe deleted the fix-junit-artifact-collision branch December 1, 2026 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants