Gate Playwright CI setup on bucket content#14727
Merged
Merged
Conversation
Six Playwright setup steps in test-smokes.yml (node install, browser cache/install, system deps) ran on every Linux job regardless of whether the job's test bucket contained a Playwright test. Under test-smokes-parallel (~20 bucket jobs per push/PR to main) that meant ~19 jobs paid 2-3 min of unused browser/system-deps installation and carried its failure surface: run 30081294158 died in `npx playwright install-deps` on a transient apt failure a bucket without Playwright had no reason to touch. Gate the six steps the way the rsvg-convert step already gates on bucket content: run only for a full serial run (empty buckets) or a bucket containing integration/playwright-tests.test.ts. Drop the schedule escape, since the suite is ignored on Windows CI (ignore: gha.isGitHubActions() && isWindows) and browser setup was pure waste there in every mode.
Collaborator
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
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.
Six Playwright setup steps in
test-smokes.yml(node dependency install, browser cache/install, system deps) run on every Linux job regardless of whether the job's test bucket actually contains a Playwright test.Under
test-smokes-parallel.yml— which runs on every push/PR to main and splits the suite into ~20 bucket jobs — that means ~19 jobs pay 2–3 minutes of browser and system-dependency installation they never use, and carry its failure surface for no benefit. Run 30081294158 saw a job die innpx playwright install-depson a transient apt failure, in a bucket that had no Playwright test to run.The workflow already has the right precedent: the "Install rsvg-convert" step gates on
format('{0}', inputs.buckets) == '' || contains(inputs.buckets, ...). The six Playwright steps now use the same idiom — they run only for a full serial run (empty buckets, which includesintegration/) or a bucket containingintegration/playwright-tests.test.ts, the only test file whose path matches "playwright".The
scheduleescape is dropped rather than carried forward: the suite is ignored on Windows CI (ignore: gha.isGitHubActions() && isWindowsinplaywright-tests.test.ts), sonpx playwright testnever runs on Windows in any mode — browser setup there was pure waste, scheduled or not.Self-trial
This PR's own "Parallel Smokes Tests" run exercises the gate directly. In the run's jobs, a bucket without a Playwright test shows the six setup steps skipped, while the bucket containing
integration/playwright-tests.test.tsstill installs browsers and passes. The only path not covered by PR CI is the Windows-scheduletightening — there is no scheduled event on a PR — which rests on the Windowsignoregate cited above.No changelog entry: CI-only change with no user-facing effect.