Skip to content

Commit 0bd6e90

Browse files
Playwright CI - install system chromium via apt (not snap)
1 parent 49d70c7 commit 0bd6e90

1 file changed

Lines changed: 15 additions & 12 deletions

File tree

.github/workflows/playwright_tests.yml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -130,19 +130,22 @@ jobs:
130130
- name: Install dependencies
131131
run: pnpm install --frozen-lockfile
132132

133-
- name: Install system Chromium
133+
- name: Install Chromium
134134
run: |
135-
if ! command -v chromium &>/dev/null && ! command -v chromium-browser &>/dev/null; then
136-
sudo apt-get update && sudo apt-get install -y chromium || sudo apt-get install -y chromium-browser
137-
fi
138-
CHROMIUM_PATH=$(command -v chromium || command -v chromium-browser || echo "")
139-
if [ -z "$CHROMIUM_PATH" ]; then
140-
echo "Chromium not found, falling back to Playwright bundled browser"
141-
cd e2e/testcafe-devextreme && npx playwright install chromium
142-
else
143-
echo "PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=$CHROMIUM_PATH" >> $GITHUB_ENV
144-
echo "Using system Chromium at: $CHROMIUM_PATH"
145-
$CHROMIUM_PATH --version
135+
sudo apt-get update
136+
sudo apt-get install -y --no-install-recommends \
137+
chromium \
138+
fonts-liberation fonts-noto-color-emoji fonts-freefont-ttf \
139+
libatk-bridge2.0-0 libdrm2 libxkbcommon0 libxcomposite1 \
140+
libxdamage1 libxrandr2 libgbm1 libasound2t64 \
141+
libpango-1.0-0 libcairo2 libcups2 libnspr4 libnss3 \
142+
2>/dev/null || {
143+
echo "apt chromium not available, using Playwright bundled"
144+
cd e2e/testcafe-devextreme && npx playwright install chromium --with-deps
145+
}
146+
CHROMIUM=$(command -v chromium 2>/dev/null || echo "")
147+
if [ -n "$CHROMIUM" ] && $CHROMIUM --version 2>/dev/null; then
148+
echo "PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=$CHROMIUM" >> $GITHUB_ENV
146149
fi
147150
148151
- name: Run Playwright tests

0 commit comments

Comments
 (0)