Skip to content

Use junit-unit.xml for unit test results in all packages - #6183

Open
VPS-Obi wants to merge 2 commits into
mainfrom
claude/hopeful-meitner-z0hxy5
Open

Use junit-unit.xml for unit test results in all packages#6183
VPS-Obi wants to merge 2 commits into
mainfrom
claude/hopeful-meitner-z0hxy5

Conversation

@VPS-Obi

@VPS-Obi VPS-Obi commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Description

The Test (unit) job in .github/workflows/test.yml uploads test results by collecting files matching packages/*/junit-unit.xml and packages/*/*/junit-unit.xml. Most packages' vitest.config.ts wrote their JUnit report to junit.xml instead, so those results were silently dropped from the uploaded artifact.

Solution

Aligned each package's vitest.config.ts outputFile.junit setting to match the Test (unit) job's collection pattern, so unit test configs now write ./junit-unit.xml.

storybook/vitest.config.ts is unchanged (./junit.xml) — the Test (storybook) job collects the root storybook package's own results from storybook/junit.xml verbatim; packages/*/junit-storybook.xml is only for storybook tests nested inside other packages (e.g. packages/admin/admin), which already produce the right filename via an --outputFile.junit CLI flag in their test:storybook script.

packages/mail-react, packages/admin/admin, and packages/admin/cms-admin also already produced the correct junit-unit.xml/junit-storybook.xml filenames via that same CLI flag, which overrides the base config — their vitest.config.ts defaults were still wrong (junit.xml) and are now fixed for consistency, even though it had no effect on CI.

Example usage

Running pnpm run test:unit in, e.g., packages/cli now produces packages/cli/junit-unit.xml (verified locally), matching what the workflow's actions/upload-artifact step expects.

Further information

No changeset added — this is an internal CI/test-config change with no effect on any package's public API or runtime behavior.

Closes #6179


Generated by Claude Code

The test workflow's artifact upload only collects packages/*/junit-unit.xml
and packages/*/*/junit-unit.xml, but most vitest configs wrote their JUnit
report to junit.xml, so those results were silently dropped from CI. Align
every package's vitest.config.ts to write junit-unit.xml for unit tests,
and junit-storybook.xml for storybook tests, matching the workflow's
collection pattern.

Fixes #6179
storybook/vitest.config.ts is the one exception to the junit-unit.xml/
junit-storybook.xml convention: the workflow's storybook job collects
this package's own results from storybook/junit.xml verbatim (only
packages/*/junit-storybook.xml is meant for storybook projects nested
inside other packages), so junit.xml is correct here and must stay.
@VPS-Obi

VPS-Obi commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

Looks safe to merge — no human review needed.


Generated by Claude Code

@VPS-Obi

This comment was marked as duplicate.

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.

Incorrect JUnit results files

2 participants