Skip to content

Commit 521e83e

Browse files
committed
fix(ci): use system Chromium instead of playwright install — eliminates post-download hang on GHA
1 parent 63738fe commit 521e83e

2 files changed

Lines changed: 6 additions & 20 deletions

File tree

.github/workflows/test.yml

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -117,25 +117,8 @@ jobs:
117117
- name: Setup Bun
118118
uses: ./.github/actions/setup-bun
119119

120-
- name: Read Playwright version
121-
id: playwright-version
122-
run: |
123-
version=$(node -e 'console.log(require("./package.json").workspaces.catalog["@playwright/test"])')
124-
echo "version=$version" >> "$GITHUB_OUTPUT"
125-
126-
- name: Cache Playwright browsers
127-
id: playwright-cache
128-
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
129-
with:
130-
path: ~/.cache/ms-playwright
131-
key: ${{ runner.os }}-${{ runner.arch }}-playwright-${{ steps.playwright-version.outputs.version }}-chromium
132-
133-
- name: Install Playwright system dependencies
134-
run: sudo node packages/app/node_modules/.bin/playwright install-deps chromium
135-
136-
- name: Install Playwright browsers
137-
if: steps.playwright-cache.outputs.cache-hit != 'true'
138-
run: node packages/app/node_modules/.bin/playwright install chromium --only-shell
120+
- name: Verify system Chromium
121+
run: chromium-browser --version || chromium --version || which chromium-browser || which chromium
139122

140123
- name: Run app e2e tests
141124
run: bun --cwd packages/app test:e2e:local

packages/app/playwright.config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ export default defineConfig({
4848
...devices["Desktop Chrome"],
4949
// Required for headless Chromium on Linux CI runners (no GPU, no sandbox)
5050
launchOptions: process.env.CI
51-
? { args: ["--no-sandbox", "--disable-gpu", "--disable-setuid-sandbox", "--disable-dev-shm-usage"] }
51+
? {
52+
executablePath: "/usr/bin/chromium-browser",
53+
args: ["--no-sandbox", "--disable-gpu", "--disable-setuid-sandbox", "--disable-dev-shm-usage"],
54+
}
5255
: {},
5356
},
5457
},

0 commit comments

Comments
 (0)