v0.66.0 — E2E results in Gitea job summary (#141) #142

Merged
kamilkrzywda merged 1 commits from ci/e2e-job-summary into master 2026-09-23 19:29:55 +02:00
Owner

What

The run page's "Job summaries" panel showed vitest results but nothing about the Playwright e2e suite, so a failed e2e run required digging into raw logs to see which specs broke (#141). Now the same panel gets an E2E results section: spec-level passed/failed/skipped counts plus file › title for every failed spec.

Mechanism (mirrors how vitest gets there)

  • Unit tests appear in the panel because vitest 5's built-in github-actions reporter auto-appends $GITHUB_STEP_SUMMARY when GITHUB_ACTIONS=true (default reporters list, no config needed). This PR mirrors that exact mechanism for e2e.
  • The E2E step now runs Playwright's built-in json reporter alongside the existing one: --reporter=list,json, with output pinned to git-ignored test-results/e2e.json via PLAYWRIGHT_JSON_OUTPUT_FILE (Playwright resolves this env var before any config option). No new npm dependencies, no changes to playwright.config.ts — the CLI flag + env var are enough.
  • A new E2E job summary step (if: always(), so a failed suite still gets summarized) parses the JSON with an inline node script (no deps) and appends markdown to $GITHUB_STEP_SUMMARY.

Non-fatal by design

The append is guarded end-to-end: missing report (e2e never ran because an earlier step failed) or malformed JSON → silent no-op, exit 0; the whole command additionally ends in || true so nothing in this step can ever fail or mask the real e2e exit code. The E2E step's own exit code is untouched — only a second reporter was added (reporters observe, they don't affect execution). Timeouts, workers, retries and the dind stack are unchanged.

Verification

  • YAML parses; the inline script was extracted verbatim from ci.yml and run against a fixture mimicking Playwright's real JSON report shape: correct spec-level counts (a flaky spec that recovers on retry counts as passed — counting is spec-level via spec.ok, not attempt-level), failed specs listed as file › title, skipped detected via expectedStatus. Missing-file, malformed-JSON and unset-GITHUB_STEP_SUMMARY cases all exit 0 without writing.
  • No TypeScript changed (YAML + version bump + changelog only) → no local suite affected per AGENTS.md; CI validates the workflow itself on this PR.

Files

  • .gitea/workflows/ci.yml — PLAYWRIGHT_JSON_OUTPUT_FILE env + ,json reporter on the E2E step; new non-fatal "E2E job summary" step
  • package.json — 0.65.0 → 0.66.0
  • CHANGELOG.md — v0.66.0 entry referencing #141
## What The run page's "Job summaries" panel showed vitest results but nothing about the Playwright e2e suite, so a failed e2e run required digging into raw logs to see which specs broke (#141). Now the same panel gets an **E2E results** section: spec-level passed/failed/skipped counts plus `file › title` for every failed spec. ## Mechanism (mirrors how vitest gets there) - Unit tests appear in the panel because **vitest 5's built-in `github-actions` reporter auto-appends `$GITHUB_STEP_SUMMARY`** when `GITHUB_ACTIONS=true` (default reporters list, no config needed). This PR mirrors that exact mechanism for e2e. - The E2E step now runs Playwright's **built-in `json` reporter** alongside the existing one: `--reporter=list,json`, with output pinned to git-ignored `test-results/e2e.json` via `PLAYWRIGHT_JSON_OUTPUT_FILE` (Playwright resolves this env var before any config option). No new npm dependencies, no changes to `playwright.config.ts` — the CLI flag + env var are enough. - A new **`E2E job summary`** step (`if: always()`, so a failed suite still gets summarized) parses the JSON with an inline node script (no deps) and appends markdown to `$GITHUB_STEP_SUMMARY`. ## Non-fatal by design The append is guarded end-to-end: missing report (e2e never ran because an earlier step failed) or malformed JSON → silent no-op, exit 0; the whole command additionally ends in `|| true` so nothing in this step can ever fail or mask the real e2e exit code. The E2E step's own exit code is untouched — only a second reporter was added (reporters observe, they don't affect execution). Timeouts, workers, retries and the dind stack are unchanged. ## Verification - YAML parses; the inline script was extracted verbatim from `ci.yml` and run against a fixture mimicking Playwright's real JSON report shape: correct spec-level counts (a flaky spec that recovers on retry counts as passed — counting is spec-level via `spec.ok`, not attempt-level), failed specs listed as `file › title`, skipped detected via `expectedStatus`. Missing-file, malformed-JSON and unset-`GITHUB_STEP_SUMMARY` cases all exit 0 without writing. - No TypeScript changed (YAML + version bump + changelog only) → no local suite affected per AGENTS.md; CI validates the workflow itself on this PR. ## Files - `.gitea/workflows/ci.yml` — `PLAYWRIGHT_JSON_OUTPUT_FILE` env + `,json` reporter on the E2E step; new non-fatal "E2E job summary" step - `package.json` — 0.65.0 → 0.66.0 - `CHANGELOG.md` — v0.66.0 entry referencing #141
kamilkrzywda added 1 commit 2026-09-23 19:08:01 +02:00
v0.66.0: e2e results in Gitea job summary (#141)
CI / build + unit + e2e (pull_request) Successful in 14m43s
d278c8ba9c
The run page's Job summaries panel showed vitest results (vitest's built-in
github-actions reporter auto-appends $GITHUB_STEP_SUMMARY in CI) but nothing
about the Playwright suite. The E2E step now also runs the built-in json
reporter (--reporter=list,json, output pinned to git-ignored test-results/e2e.json
via PLAYWRIGHT_JSON_OUTPUT_FILE), and a new non-fatal 'E2E job summary' step
(if: always()) parses it with an inline node script and appends spec-level
passed/failed/skipped counts + failed spec names (file > title) to
$GITHUB_STEP_SUMMARY. Guarded so a missing/malformed report can never fail or
mask the e2e step's real exit code; no test behavior, timeouts, workers or
retries changed.
kamilkrzywda scheduled this pull request to auto merge when all checks succeed 2026-09-23 19:11:23 +02:00
kamilkrzywda merged commit 4b01c320fa into master 2026-09-23 19:29:55 +02:00
Sign in to join this conversation.