fix(ci): extract Playwright install steps into composite action#846
Merged
fix(ci): extract Playwright install steps into composite action#846
Conversation
Add .github/actions/playwright-install composite action and use it in both the test and e2e jobs, eliminating duplicated cache/install steps. Also fixes the test job, which was seeing a missing-browser error due to the same root cause fixed for the e2e job in fd122f6. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
Coverage Report
File CoverageNo changed files found. |
The postinstall script now checks $CI (always true in GitHub Actions) instead of PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD, removing the need to set that env var in every job. Also removes the now-redundant Dependabot check since Dependabot runs in CI. Co-Authored-By: Claude Sonnet 4.6 <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.
The
testjob was logging a Playwright "Executable doesn't exist" error (the same root cause fixed for thee2ejob in #844): thepreparejob cachesnode_moduleswhile the postinstall script skips browser downloads in CI, so when downstream jobs restore from cache, Playwright browsers are never downloaded.Changes
.github/actions/playwright-installcomposite action that caches~/.cache/ms-playwright(keyed on OS +yarn.lock) and installs Playwright Chromium with--with-depson cache miss, or justinstall-depson cache hit; use it in both thetestande2ejobsscripts/playwright-install.shto check$CI(alwaystruein GitHub Actions) instead ofPLAYWRIGHT_SKIP_BROWSER_DOWNLOAD, removing the need to set that env var in every job and the now-redundant Dependabot check (Dependabot runs in CI)--with-depsinplaywright-install.sh, removing the deadPLAYWRIGHT_ONLY_SHELLand CI-branch logicTesting
CI-only change. Verified by pushing and confirming both
TestandE2E Testsjobs install Playwright browsers correctly. The two jobs share the same cache key, so only one download occurs peryarn.lockhash.🤖 Generated with Claude Code