ci: Skip Playwright install for e2e apps without @playwright/test - #23722
Merged
Merged
Conversation
mydea
force-pushed
the
fn/e2e-skip-playwright
branch
from
August 28, 2026 08:44
e34a2ea to
af18cd6
Compare
mydea
marked this pull request as ready for review
August 28, 2026 08:46
andreiborza
approved these changes
Aug 28, 2026
andreiborza
left a comment
Member
There was a problem hiding this comment.
Nice idea checking wether it's importable
mydea
force-pushed
the
fn/e2e-skip-playwright
branch
from
August 28, 2026 08:51
af18cd6 to
c5f10d2
Compare
Contributor
size-limit report 📦
|
mydea
force-pushed
the
fn/e2e-skip-playwright
branch
from
August 28, 2026 09:02
c5f10d2 to
656420c
Compare
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.
The e2e jobs install Playwright browsers for every test application, via the shared
install-playwrightaction. A number of apps assert through a plain node script and never depend on@playwright/test— the five node bundler apps (node-vite,node-webpack,node-rollup,node-rolldown,node-esbuild),node-exports-test-app, and a handful of others. For those the install is wasted CI time, and it's latently broken: the action's "Get Playwright version" step doesrequire('@playwright/test/package.json')in the app directory, which throws when the package isn't installed there.This moves the decision into the
install-playwrightaction itself. The version step now resolves@playwright/testdefensively and emits an empty version when it's absent instead of failing; the cache-restore, browser-install, and cache-save steps are gated on a non-empty version, so an app without Playwright simply skips them. Apps that use Playwright are unaffected.Decisions
install-playwrightmeans every caller (both e2e jobs today, and any future one) gets the skip for free, with nothing to wire up per call site or per app.@playwright/testresolves from the app is the source of truth for whether it uses Playwright, so there's no separate flag to keep in sync as apps are added or removed.