Skip to content

Commit 5dcc55b

Browse files
committed
fix: simplify Playwright installation in GitHub Actions
1 parent 4d1445e commit 5dcc55b

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

.github/workflows/setup-node/action.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,6 @@ runs:
99
with:
1010
node-version: 20
1111

12-
- name: Install system dependencies for Playwright 🖥️
13-
shell: bash
14-
run: |
15-
sudo apt-get update
16-
sudo apt-get install -y libasound2t64 libffi8 libx264-dev fonts-liberation libnss3 libatk-bridge2.0-0 libatk1.0-0 libatspi2.0-0 libcups2 libdbus-1-3 libdrm2 libgbm1 libnspr4 libpango-1.0-0 libxcomposite1 libxdamage1 libxfixes3 libxkbcommon0 libxrandr2 xvfb
17-
1812
- name: Cache dependencies ⚡
1913
id: cache_dependencies
2014
uses: actions/cache@v3
@@ -25,4 +19,17 @@ runs:
2519
- name: Install dependencies 🔧
2620
shell: bash
2721
if: steps.cache_dependencies.outputs.cache-hit != 'true'
28-
run: npm install
22+
run: npm install
23+
24+
- name: Install Playwright and browsers
25+
shell: bash
26+
run: |
27+
# Update package lists with official repositories
28+
sudo apt-get update
29+
30+
# Install system dependencies first
31+
sudo apt-get install -y wget xvfb
32+
33+
# Install Playwright browsers with the recommended GitHub Actions approach
34+
# This will automatically install the correct dependencies for the browsers
35+
npx playwright install --with-deps chromium firefox webkit

0 commit comments

Comments
 (0)