Skip to content

fix: keep annotations of nested suites with group_reports disabled - #1649

Merged
mikepenz merged 1 commit into
mikepenz:mainfrom
NopeCharon:fix/ungrouped-nested-annotations
Nov 6, 2026
Merged

mikepenz merged 1 commit into
mikepenz:mainfrom
NopeCharon:fix/ungrouped-nested-annotations

Conversation

@NopeCharon

Copy link
Copy Markdown
Contributor

Fixes #1647

Problem

With group_reports: false, the per-file result takes annotations and testResults from the root suite of the report. annotations only holds the root's own test cases, so reports with a <testsuites> root (pytest, jest-junit, go-junit-report, ...) lose all their annotations: the check run has none although its title lists failures, and the detailed and flaky summaries have no rows for that file. testResults skips the root itself, so with group_suite: true the test cases of a root <testsuite> (e.g. surefire) are missing from the detailed summary.

Fix

  • New ungroupTestResult next to addToModuleResults, replacing the inline mapping in main.ts.
  • globalAnnotations uses collectAnnotations, the helper that fixed the same problem for module_reports.
  • testResults is [actual], so the root suite is included, as in grouped mode and module_reports. Reports whose root has no test cases of its own render the same grouped details as before.

Tests

New ungrouped reports tests in __tests__/testParser.test.ts: one result per file, annotations from nested suites, root suite test cases in the grouped details table. All three fail with the old mapping.

npm run all passes (128 tests). I also ran the packaged action against a local fake of the checks API with test_results/python/report.xml and group_reports: false:

Annotations sent Failure rows in the job summary
before 0 0
after 2 2

dist/ was rebuilt with npm run package.

@mikepenz mikepenz added the fix label Nov 6, 2026
With `group_reports: false` the per-file result took `annotations` and
`testResults` straight from the root suite of the report. `annotations`
only holds the test cases of the root itself, so reports with a
`<testsuites>` root (pytest, jest-junit, go-junit-report, ...) published a
check without annotations and summaries without rows, although the title
listed the failures. `testResults` skipped the root itself, which hid the
test cases of a root `<testsuite>` from the details with `group_suite`.

Move the mapping to `ungroupTestResult`, collect the annotations of nested
suites like `module_reports` does, and keep the root suite in `testResults`.
Rebuild dist.

Fixes mikepenz#1647
@mikepenz
mikepenz force-pushed the fix/ungrouped-nested-annotations branch from e75a57c to 6e4289e Compare November 6, 2026 13:55
@mikepenz
mikepenz merged commit a16be3a into mikepenz:main Nov 6, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

group_reports: false loses annotations of nested suites

2 participants