Skip to content

Build/Test Tools: Remove redundant Playwright setup in E2E CI. - #13369

Open
adimoldovan wants to merge 4 commits into
WordPress:trunkfrom
adimoldovan:skip-playwright-browser-downloads
Open

Build/Test Tools: Remove redundant Playwright setup in E2E CI.#13369
adimoldovan wants to merge 4 commits into
WordPress:trunkfrom
adimoldovan:skip-playwright-browser-downloads

Conversation

@adimoldovan

@adimoldovan adimoldovan commented Sep 2, 2026

Copy link
Copy Markdown

Trac ticket: https://core.trac.wordpress.org/ticket/66035

The E2E workflow does two pieces of Playwright setup that nothing uses.

A second browser install. wp-scripts test-playwright runs npx playwright install with no browser argument, which installs Chromium, Firefox, and WebKit. An earlier step already installed Chromium, so every job downloads Firefox and WebKit and never opens them. Setting PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD on the Run E2E tests step makes wp-scripts skip it.

--with-deps. On ubuntu-24.04, every shared library Chromium needs reports already the newest version. The flag installs nine font packages instead, covering CJK, Thai, Cyrillic, and the X core fonts. No spec in tests/e2e uses those scripts, the workflow installs only de_DE, and no spec asserts on a screenshot.

Before, on trunk run 33649288756:

Install Playwright browsers
  0 upgraded, 9 newly installed, 0 to remove and 86 not upgraded.
  Need to get 21.1 MB of archives.

Run E2E tests
  Downloading Firefox 151.0 (playwright firefox v1532) ...
  Downloading WebKit 26.5 (playwright webkit v2311) ...
  Playwright Host validation warning:
  ║ Host system is missing dependencies to run browsers. ║

After, on run 33661004598 for this branch: none of those lines appear, Chromium and the headless shell still install, and both jobs pass 27 tests, the same count as the trunk run. Each job finished about a minute sooner. A single pair of runs makes that figure noisy; the removed work accounts for roughly 36 seconds of it.

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5
Used for: Reviewing these changes against the CI job logs and the @wordpress/scripts source.


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

The workflow installs Chromium. The suite runs no other browser.
`wp-scripts test-playwright` then runs `playwright install` again, which
downloads Firefox and WebKit and warns about libraries they need.

Set PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD on the test step when the workflow
installs the browsers.
@adimoldovan adimoldovan self-assigned this Sep 2, 2026
On ubuntu-24.04 the runner image already provides every shared library
Chromium needs. The apt step reports each one as already the newest
version. `--with-deps` then installs 9 font packages, 21.1 MB, and adds
about 27 seconds to every E2E job.

Those fonts cover CJK, Thai, and Cyrillic. No spec in tests/e2e uses
those scripts, the workflow installs only de_DE, and no spec asserts on
a screenshot.

The performance workflow keeps `--with-deps`. Its metrics feed a trend,
and a font change could shift them.
@adimoldovan adimoldovan changed the title Build/Test Tools: Skip redundant Playwright browser downloads. Build/Test Tools: Reduce redundant Playwright setup in E2E CI. Sep 2, 2026
`playwright install chromium` reads plainly on its own. The reason for
leaving out `--with-deps` belongs in the ticket, not in the workflow.
@adimoldovan adimoldovan changed the title Build/Test Tools: Reduce redundant Playwright setup in E2E CI. Build/Test Tools: Remove redundant Playwright setup in E2E CI. Sep 3, 2026
@adimoldovan
adimoldovan marked this pull request as ready for review September 3, 2026 10:29
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props adrianmoldovanwp.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

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

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

1 participant