ci(e2e): wire Playwright suite into DTT with a run summary#73232
Open
stephenliang wants to merge 2 commits into
Open
ci(e2e): wire Playwright suite into DTT with a run summary#73232stephenliang wants to merge 2 commits into
stephenliang wants to merge 2 commits into
Conversation
Add :playwright_ui to test:ui_all so the deploy-time DTT runs it alongside the Cucumber/eyes suites. It is non-blocking, so it reports to #infra-test but never fails the train. Provisioning: drop the per-run `playwright install-deps` (apt every run on the daemon — root, network, hang-prone) and keep the version-aware `playwright install`, a no-op when the pinned build is present. OS deps are provisioned once out-of-band. Reporting: the html/json reporters were gated on CI, which the DTT daemon does not set, so DTT produced no report or counts. Gate them on a new isAutomated signal (CI or PLAYWRIGHT_CI, set by test:ui:ci) so both Drone and DTT emit artifacts while local runs stay lean. The task now posts a Cucumber-style summary — pass/fail counts, duration, and report links at start and finish. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The shared CI script now removes playwright-report/ and test-results/ before installing and running, so a failure before the suite starts (e.g. a browser-install hiccup under set -e) can't leave the previous run's report and results for the rake task to upload and summarize as this run's. Surfaced by review now that both artifacts are generated on the DTT, not just Drone. Also from review: TARGET_URL falls back via .presence so a set-but-empty value no longer runs against a blank target; hoist the repeated e2e-tests path into a local; and drop the over-specific #infra-test/impl detail from the json reporter comment. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Wires the Playwright e2e suite into the automated deploy-time test train (DTT), and fixes why its
#infra-testmessages were missing report links and counts. Builds on the existingtest:playwright_uitask (already run by Drone), verified to run manually on the DTT.DTT wiring
Adds
:playwright_uitotest:ui_all, so the DTT runs it in parallel with the Cucumber/eyes suites. It is non-blocking (rescues its own failure), so it reports to#infra-testbut never fails the train. No double-run in Drone — that path isci:run_ui_tests, which doesn't touchui_all.Provisioning (flake fix)
Drops the per-run
playwright install-depsfrom the shared CI script: it shelled out to apt on every DTT run (root, network, hang-prone). The version-awareplaywright installstays — a ~0.5s no-op when the pinned browser build is present, fetching only after a version bump. OS-level deps are now provisioned once out-of-band.Reporting (the
#infra-testmessage)Root cause: the
html/jsonreporters were gated onCI, which the DTT daemon doesn't set — so DTT produced no report dir and no machine-readable results, hence no link and no counts. Introduces anisAutomatedsignal (CI || PLAYWRIGHT_CI, the latter set byyarn test:ui:ci) that is true in both Drone and DTT; localtest:ui:localstays lean (list reporter only). The task now posts a Cucumber-style summary — pass/fail/skip counts, flaky, duration, and report links at start and finish.flowchart LR subgraph Drone A[ui_tests.sh] --> R["rake test:playwright_ui"] end subgraph DTT B["test:ui_all"] --> R end R --> S["run-playwright-tests-ci.sh"] S --> P["yarn test:ui:ci sets PLAYWRIGHT_CI"] P --> C{"isAutomated? CI or PLAYWRIGHT_CI"} C -->|yes| RPT["list + html + json"] C -->|local| LST["list only"] RPT --> U["upload report to S3"] RPT --> J["parse results.json"] U --> M["infra-test summary: counts, duration, links"] J --> MLinks
Testing story
yarn typecheck, Ruby/shell syntax, andpre-commitlint all pass.PLAYWRIGHT_CI=1→playwright-report/+test-results/results.jsongenerated.results.jsonplus synthetic mixes (fail/flaky/skip) and the missing-file fallback.TARGET_URL=https://test-studio.code.org bundle exec rake test:playwright_uiagainst the test env: 9/9 passed, real S3 report link in the posted message.playwright installconfirmed as a 0.46s no-op when browsers are present.test:ui_all) not run locally — it dispatches the eyes/SauceLabs/Device Farm suites, which need remote infra; statically confirmed:playwright_uiis in the list.Deployment notes
sudo yarn exec playwright install-deps), since the per-runinstall-depsis removed. A future Playwright bump that adds a new system lib would need this re-run once.🤖 Generated with Claude Code