Skip to content

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

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

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, swissspidy, ugyensupport.

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

@dugyen

dugyen commented Sep 3, 2026

Copy link
Copy Markdown

Verified: reviewed the workflow diff and confirmed the gating logic (PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD is only set when install-playwright is true, so the fallback path for install-playwright: false callers is unaffected). Checked the PR's own CI run (#62141) directly: all 16 checks pass, both E2E matrix jobs succeed with 27/27 tests (26 passed + 1 flaky-then-passed) in each job, matching the trunk baseline count — confirming no coverage is lost by dropping --with-deps and skipping the redundant Firefox/WebKit download. LGTM.

pento pushed a commit that referenced this pull request Sep 3, 2026
The workflow installs Chromium before running the suite. Prevent `wp-scripts test-playwright` from installing Chromium, Firefox, and WebKit again when that setup has already run.

Also stop passing `--with-deps`, which only adds unused fonts on the current Ubuntu runner.

Developed in: #13369

Props adrianmoldovanwp, swissspidy, ugyensupport.
Fixes #66035.


git-svn-id: https://develop.svn.wordpress.org/trunk@63446 602fd350-edb4-49c9-b593-d223f7449a82
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

A commit was made that fixes the Trac ticket referenced in the description of this pull request.

SVN changeset: 63446
GitHub commit: a0dbcfb

This PR will be closed, but please confirm the accuracy of this and reopen if there is more work to be done.

@github-actions github-actions Bot closed this Sep 3, 2026
@github-project-automation github-project-automation Bot moved this from In review to Done in WordPress Project Build Tooling Sep 3, 2026
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Sep 3, 2026
The workflow installs Chromium before running the suite. Prevent `wp-scripts test-playwright` from installing Chromium, Firefox, and WebKit again when that setup has already run.

Also stop passing `--with-deps`, which only adds unused fonts on the current Ubuntu runner.

Developed in: WordPress/wordpress-develop#13369

Props adrianmoldovanwp, swissspidy, ugyensupport.
Fixes #66035.

Built from https://develop.svn.wordpress.org/trunk@63446


git-svn-id: http://core.svn.wordpress.org/trunk@62627 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

4 participants