feat: HTML report artifact generation#32
Merged
Conversation
Replace flat metric tables with status-first hero header, Unicode progress bar, and single-line metrics strip. Consolidate per-test failure tables into one HTML table with bold test names. Wrap slowest tests in a collapsible <details> block. Add emoji section headers throughout. Move API failure warning above metrics. Extract shared formatting utilities (renderProgressBar, statusEmoji, renderMetricsStrip) to src/output/format.ts. PR comment omits zero failed count on passing runs and only shows the stats/details divider when content is present.
Each failure now renders as its own table + stack trace block instead of all failures in one table followed by all traces.
Replace per-failure HTML tables with a compact block layout: test name in inline code + suite + blockquote error message. Stack trace stays directly below its failure.
Generates a self-contained HTML report and uploads it as a GitHub Actions artifact after each run. Enabled by default (html-report: true). - New html-report and artifact-name inputs in action.yml - src/output/html-report.ts: pure generateHtmlReport() with inline CSS, all summary sections, collapsible stack traces, metadata footer - src/output/upload-artifact.ts: DefaultArtifactClient wrapper with non-blocking error handling and temp file cleanup - Artifact URL (run#artifacts) surfaced in CI summary and PR comment - 50 new tests; all 632 pass
v6 is ESM-only and incompatible with ncc bundling. v2.x has a commonjs main entry that ncc can bundle correctly.
Adds a Permissions section explaining which features need which permissions, with a job-level example and a note about the non-blocking guarantee when permissions are missing. Also updates the Quick Start "With PR Comments" snippet to include the required permissions block inline.
Unique filename prevents collisions when multiple jobs run in the same temp directory. Boolean return lets the caller skip setting artifactUrl when the upload actually failed.
Resolve conflict in src/output/summary.ts (visual redesign vs artifact-url addition) and rebuild dist.
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Generates a self-contained HTML test report and uploads it as a GitHub Actions
artifact after each run. Enabled by default (
html-report: true). A directlink to the artifacts section of the run is surfaced in both the CI job summary
and the PR comment.
Changes
action.yml— newhtml-report(boolean, defaulttrue) andartifact-name(string, default
testglance-report) inputssrc/output/html-report.ts— puregenerateHtmlReport()returning aself-contained HTML string: inline CSS, responsive layout, all sections
matching the CI summary (header, highlights, trends, delta, tests changed,
flaky, perf regressions, suite breakdown, failed tests with collapsible stack
traces, slowest tests), metadata footer with commit SHA / branch / run link
src/output/upload-artifact.ts— thin wrapper aroundDefaultArtifactClientthat writes the HTML to a temp file, uploads, then cleans up; errors are
core.warning()only, nevercore.setFailed()src/output/pr-comment.ts— added optionalartifactUrlfield; rendered asa
📄 HTML Reportlink next to "View Run"src/output/summary.ts— added optionalartifactUrlfield; rendered as adownload link at the bottom of the job summary
src/index.ts— HTML report generated before summary soartifactUrlisavailable for both summary and PR comment
@actions/artifactpinned to v2.3.2 (v6 is ESM-only, incompatible with ncc)Test plan
testglance-reportappearsunder Artifacts in the run summary
browser, stack traces are collapsible
📄 HTML Reportlink pointing to#artifactshtml-report: falseskips generation with no artifact uploaded