Skip to content

Add collapsible test summary to GitHub Actions job summary - #986

Closed
agampe wants to merge 1 commit into
facebook:mainfrom
agampe:export-D102739347
Closed

Add collapsible test summary to GitHub Actions job summary#986
agampe wants to merge 1 commit into
facebook:mainfrom
agampe:export-D102739347

Conversation

@agampe

@agampe agampe commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

Summary:
Parse GTest XML results and write a collapsible markdown summary to $GITHUB_STEP_SUMMARY showing pass/fail counts with expandable failure details. Uses pure Python stdlib (no external dependencies).

The new "Test summary" step runs between artifact upload and the failure gate step. It parses all GTest XML files from /tmp/test-results/ using xml.etree.ElementTree and generates a markdown summary with:

  • Header showing overall pass/fail/skip counts
  • Collapsible
    Details blocks for each failed test suite with failure messages
  • Collapsible block listing all passing suite names
  • Stats line showing number of test binaries and total time

Handles edge cases: no XML files found, malformed XML from crashed tests, and the 1 MiB $GITHUB_STEP_SUMMARY size limit.

Differential Revision: D102739347

Summary:
Parse GTest XML results and write a collapsible markdown summary to $GITHUB_STEP_SUMMARY showing pass/fail counts with expandable failure details. Uses pure Python stdlib (no external dependencies).

The new "Test summary" step runs between artifact upload and the failure gate step. It parses all GTest XML files from /tmp/test-results/ using xml.etree.ElementTree and generates a markdown summary with:
- Header showing overall pass/fail/skip counts
- Collapsible <details> blocks for each failed test suite with failure messages
- Collapsible block listing all passing suite names
- Stats line showing number of test binaries and total time

Handles edge cases: no XML files found, malformed XML from crashed tests, and the 1 MiB $GITHUB_STEP_SUMMARY size limit.

Differential Revision: D102739347
@meta-cla meta-cla Bot added the CLA Signed label Apr 28, 2026
@meta-codesync

meta-codesync Bot commented Apr 28, 2026

Copy link
Copy Markdown

@agampe has exported this pull request. If you are a Meta employee, you can view the originating Diff in D102739347.

@meta-codesync

meta-codesync Bot commented Apr 29, 2026

Copy link
Copy Markdown

This pull request has been merged in 9180d0b.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant