Skip to content

chore(CI): speed up playwright browser setup#3223

Merged
SoonIter merged 2 commits intomainfrom
syt-vibe-kanban/40ac-https-github-com
Mar 13, 2026
Merged

chore(CI): speed up playwright browser setup#3223
SoonIter merged 2 commits intomainfrom
syt-vibe-kanban/40ac-https-github-com

Conversation

@SoonIter
Copy link
Copy Markdown
Member

@SoonIter SoonIter commented Mar 13, 2026

Summary

Related Issue

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

AI Summary

On GitHub Actions, Chrome is preinstalled on the runner. By setting channel: 'chrome' in the Playwright config for CI, we can use the system Chrome directly instead of downloading a separate Chromium binary.

Changes

  • playwright.config.ts: Added channel: isCI ? 'chrome' : undefined so Playwright uses the pre-installed Chrome in CI while keeping default Chromium for local development.
  • .github/workflows/test-macOS.yml and .github/workflows/test-Windows.yml: Removed the pnpm playwright install --with-deps chromium step from the E2E test command, since the browser download is no longer needed.

Why

The playwright install --with-deps chromium step downloads ~150MB+ of browser binaries on every CI run. Since GitHub Actions runners already have Chrome installed, we can skip this entirely by telling Playwright to use the system Chrome via the channel option. This saves several minutes per CI run, especially on Windows.

Reference: web-infra-dev/rsbuild#6877

This PR was written using Vibe Kanban


Use the pre-installed Chrome on GitHub Actions runners instead of
downloading Chromium, removing the `playwright install` step from CI.
Copilot AI review requested due to automatic review settings March 13, 2026 03:53
@SoonIter SoonIter changed the title 参考一下 https://github.com/web-infra-dev/rsbuild/pull/6877/,参考这个来优化 playwright 安装耗时 (vibe-kanban) chore(CI): speed up playwright browser setup Mar 13, 2026
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Mar 13, 2026

Deploying rspress-v2 with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0da7da3
Status: ✅  Deploy successful!
Preview URL: https://44ecf618.rspress-v2.pages.dev
Branch Preview URL: https://syt-vibe-kanban-40ac-https-g.rspress-v2.pages.dev

View logs

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Playwright CI setup to reduce E2E runtime by using the system-installed Chrome on CI and removing explicit browser installation steps in GitHub Actions.

Changes:

  • Add an isCI flag in playwright.config.ts and use it for retries and selecting the chrome channel on CI.
  • Remove pnpm playwright install --with-deps chromium from macOS/Windows CI workflows and run E2E directly.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
playwright.config.ts Switch CI runs to use the system Chrome channel and refactor CI detection for retries.
.github/workflows/test-macOS.yml Remove explicit Playwright Chromium installation before E2E tests.
.github/workflows/test-Windows.yml Remove explicit Playwright Chromium installation before E2E tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 13, 2026

Rsdoctor Bundle Diff Analysis

⚠️ Note: The latest commit (47392b9394) does not have baseline artifacts. Using commit 8faea954ed for baseline comparison instead. If this seems incorrect, please wait a few minutes and try rerunning the workflow.

Found 3 projects in monorepo, 0 projects with changes.

📊 Quick Summary
Project Total Size Change
node 12.4 MB 0
node_md 1.6 MB 0
web 16.1 MB 0

Generated by Rsdoctor GitHub Action

Avoids the need for ffmpeg in CI, which was causing failures after
removing the `playwright install` step.
@SoonIter SoonIter requested a review from Timeless0911 March 13, 2026 10:04
@SoonIter SoonIter enabled auto-merge (squash) March 13, 2026 10:04
@SoonIter SoonIter merged commit e4f902e into main Mar 13, 2026
5 checks passed
@SoonIter SoonIter deleted the syt-vibe-kanban/40ac-https-github-com branch March 13, 2026 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants