Skip to content

chore(ci): surface pass/fail + failure reasons on Actions run page - #92

Merged
bermudas merged 2 commits into
mainfrom
chore/test-ci-results-visibility
Jul 3, 2026
Merged

chore(ci): surface pass/fail + failure reasons on Actions run page#92
bermudas merged 2 commits into
mainfrom
chore/test-ci-results-visibility

Conversation

@bermudas

@bermudas bermudas commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds Playwright's built-in github reporter to playwright.config.ts, gated to process.env.CI only (kept out of local runs) — additive, alongside the existing html/json reporter entries which are unchanged. Emits ::error:: workflow commands (file:line + message) for every failure, rendered by GitHub as inline annotations on the Checks tab.
  • Adds a .github/scripts/summarize-results.js script + a new if: always() workflow step in .github/workflows/playwright.yml that parses the existing test-results/json/run.json (json reporter output, unchanged) into a markdown pass/fail/flaky/skipped table + per-failed-test title/file:line/reason, appended to $GITHUB_STEP_SUMMARY.
  • Operator ask: review pass/fail + WHY something failed directly on the Actions run page, without downloading the HTML report artifact.
  • No suppression of anything: known-defect failures (GH#29/[MINOR] Welcome Message field value lost on Save when filled via fast, consecutive form input #43/etc.) still show up as real failures, annotated and in the summary table — that's the point.
  • No trigger changes — still workflow_dispatch only, per .agents/testing.md § CI integration.

Test plan

  • npx playwright test --list locally (no CI env) — github reporter correctly absent, no errors.
  • CI=1 npx playwright test --list --grep "TC-001"github reporter active, emitted a real ::notice:: workflow command, exit 0.
  • .github/scripts/summarize-results.js unit-verified against a real run.json captured from an actual (intentionally-pointed-at-a-wrong-URL) local run — confirmed: JSON reporter's exact schema (stats.expected/unexpected/flaky/skipped, nested suites[].specs[].tests[]), ANSI color codes in error.message are stripped, top-level file-suite title excluded from the failure breadcrumb (would've duplicated the Location column).
  • Edge cases verified: missing run.json, malformed JSON, zero failures, failures present.
  • Real GitHub Actions run triggered on this branch and verified end-to-end (see Run Report / PR comment for the run URL, screenshots of the rendered annotations + step summary).

https://claude.ai/code/session_01Le9JiPjQB7349wghx16Ghv

Adds Playwright's built-in `github` reporter (CI-only, additive alongside
the existing html/json reporters) for inline ::error:: annotations on the
Checks tab, plus a step that parses test-results/json/run.json into a
markdown pass/fail table + per-failure reason on $GITHUB_STEP_SUMMARY —
so a run's outcome and its "why" are visible without downloading the HTML
report artifact.
Operator-requested defense-in-depth for the infra-crash bucket seen on run
28658801255 ("Target page, context or browser has been closed" + empty
.fill() reads). Verified this flag is already Playwright's own
unconditional chromium default (playwright-core's chromiumSwitches), so
this is a harmless duplicate rather than a fix for something that was
missing -- noted inline. Real root cause of the infra-crash bucket, if it
persists on the next run, is still open.
@bermudas
bermudas merged commit c32cdf7 into main Jul 3, 2026
1 check passed
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.

1 participant