Skip to content

Commit

Permalink
ci: Fix failing Playwright setup (#172)
Browse files Browse the repository at this point in the history
* chore(devDeps): playwright@~1.33.0->~1.44.1

- @playwright/test@~1.33.0->~1.44.1

* chore(ci): install playwright system dependencies explicitly

- playwright < 1.45 does not install correct packages for ubuntu >=22.04
- playwright >= 1.45 not compatile with supported node.js 16
  • Loading branch information
legobeat authored Oct 8, 2024
1 parent 1b14a94 commit bd7947b
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 25 deletions.
86 changes: 85 additions & 1 deletion .github/workflows/build-lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,92 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn --immutable --immutable-cache
- name: Install Playwright System Dependencies
env:
DEBIAN_FRONTEND: noninteractive
# https://github.com/microsoft/playwright/blob/release-1.47/packages/playwright-core/src/server/registry/nativeDeps.ts
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
fonts-freefont-ttf \
fonts-ipafont-gothic \
fonts-liberation \
fonts-noto-color-emoji \
fonts-tlwg-loma-otf \
fonts-unifont \
fonts-wqy-zenhei \
gstreamer1.0-libav \
gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good \
libasound2t64 \
libatk-bridge2.0-0t64 \
libatk1.0-0t64 \
libatomic1 \
libatspi2.0-0t64 \
libcairo-gobject2 \
libcairo2 \
libcups2t64 \
libdbus-1-3 \
libdrm2 \
libenchant-2-2 \
libepoxy0 \
libevent-2.1-7t64 \
libflite1 \
libfontconfig1 \
libfreetype6 \
libgbm1 \
libgdk-pixbuf-2.0-0 \
libgles2 \
libglib2.0-0t64 \
libgstreamer-gl1.0-0 \
libgstreamer-plugins-bad1.0-0 \
libgstreamer-plugins-base1.0-0 \
libgstreamer1.0-0 \
libgtk-3-0t64 \
libharfbuzz-icu0 \
libharfbuzz0b \
libhyphen0 \
libicu74 \
libjpeg-turbo8 \
liblcms2-2 \
libmanette-0.2-0 \
libnspr4 \
libnss3 \
libopus0 \
libpango-1.0-0 \
libpangocairo-1.0-0 \
libpng16-16t64 \
libsecret-1-0 \
libsoup-3.0-0 \
libvpx9 \
libwayland-client0 \
libwayland-egl1 \
libwayland-server0 \
libwebp7 \
libwebpdemux2 \
libwoff1 \
libx11-6 \
libx11-xcb1 \
libx264-164 \
libxcb-shm0 \
libxcb1 \
libxcomposite1 \
libxcursor1 \
libxdamage1 \
libxext6 \
libxfixes3 \
libxi6 \
libxkbcommon0 \
libxml2 \
libxrandr2 \
libxrender1 \
libxslt1.1 \
xfonts-cyrillic \
xfonts-scalable \
xvfb
- name: Install Playwright Browsers
run: yarn playwright install --with-deps chrome chromium firefox msedge
run: yarn playwright install chrome chromium firefox msedge
- name: Run Playwright tests
run: yarn test
- uses: actions/upload-artifact@v3
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@metamask/eslint-config": "^9.0.0",
"@metamask/eslint-config-nodejs": "^9.0.0",
"@metamask/eslint-config-typescript": "^9.0.1",
"@playwright/test": "~1.33.0",
"@playwright/test": "~1.44.1",
"@types/node": "^14.18.58",
"@types/punycode": "^2.1.0",
"@typescript-eslint/eslint-plugin": "^4.33.0",
Expand All @@ -57,7 +57,7 @@
"fs-extra": "^11.1.1",
"http-server": "^14.1.1",
"minify-stream": "^2.1.0",
"playwright": "~1.33.0",
"playwright": "~1.44.1",
"prettier": "^2.6.2",
"prettier-plugin-packagejson": "^2.2.17",
"ts-node": "^10.7.0",
Expand Down
43 changes: 21 additions & 22 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1675,7 +1675,7 @@ __metadata:
"@metamask/eslint-config-typescript": ^9.0.1
"@metamask/object-multiplex": ^2.0.0
"@metamask/post-message-stream": ^8.0.0
"@playwright/test": ~1.33.0
"@playwright/test": ~1.44.1
"@types/node": ^14.18.58
"@types/punycode": ^2.1.0
"@typescript-eslint/eslint-plugin": ^4.33.0
Expand All @@ -1693,7 +1693,7 @@ __metadata:
fs-extra: ^11.1.1
http-server: ^14.1.1
minify-stream: ^2.1.0
playwright: ~1.33.0
playwright: ~1.44.1
prettier: ^2.6.2
prettier-plugin-packagejson: ^2.2.17
punycode: ^2.3.1
Expand Down Expand Up @@ -1890,19 +1890,14 @@ __metadata:
languageName: node
linkType: hard

"@playwright/test@npm:~1.33.0":
version: 1.33.0
resolution: "@playwright/test@npm:1.33.0"
"@playwright/test@npm:~1.44.1":
version: 1.44.1
resolution: "@playwright/test@npm:1.44.1"
dependencies:
"@types/node": "*"
fsevents: 2.3.2
playwright-core: 1.33.0
dependenciesMeta:
fsevents:
optional: true
playwright: 1.44.1
bin:
playwright: cli.js
checksum: cec3215fc92c1cb9f5bfba357ea1cbe97b54979ab82f9d34a2287b1687cda5e0966b8ea7290dcd35416e18668e56d5781b6b8c4cec64baf12f3ae8dde0f68f5e
checksum: 90507b77e388aa984deb92db56f7bb3b305c6be441e1d0087ca046989cfdda068bbc26d75bd29c20ad3dbb2434e69a8ff0d6b30003b88c9234cd3aa6a9f7deb9
languageName: node
linkType: hard

Expand Down Expand Up @@ -6218,23 +6213,27 @@ __metadata:
languageName: node
linkType: hard

"playwright-core@npm:1.33.0":
version: 1.33.0
resolution: "playwright-core@npm:1.33.0"
"playwright-core@npm:1.44.1":
version: 1.44.1
resolution: "playwright-core@npm:1.44.1"
bin:
playwright: cli.js
checksum: 5fb7bda06a8b73b56b85b5a0b8f711211dde57a375d9379289e22239b2de879c6d93c8fdc9ba44b932bf100914ab1ca1a55697ad88440fdd0a39101fc020b77f
playwright-core: cli.js
checksum: ebc6fa0ff77792fe52648fda06cc4474d4e9746db6dc5750d262b7fe2caf9f9e2327a71f1fb365e862213403a9daf95361c5040a9b0fd462928d7eb4fdc760e1
languageName: node
linkType: hard

"playwright@npm:~1.33.0":
version: 1.33.0
resolution: "playwright@npm:1.33.0"
"playwright@npm:1.44.1, playwright@npm:~1.44.1":
version: 1.44.1
resolution: "playwright@npm:1.44.1"
dependencies:
playwright-core: 1.33.0
fsevents: 2.3.2
playwright-core: 1.44.1
dependenciesMeta:
fsevents:
optional: true
bin:
playwright: cli.js
checksum: fb3934c56ed749cf412ea35b82052f013872d7f7b7747ab7042580af473dfc1b038956a31c132ee8c0098f74150c75e2073e9c737fd4c1ed54700a23fffc079f
checksum: c2e8ff0a855e4a9e665ae5ffa0ff90423289546157be55e83f78916d17075c5910a7244773739c2a973da884a4ff0b3cf9b6e6b543de112e43b12169a9208e86
languageName: node
linkType: hard

Expand Down

0 comments on commit bd7947b

Please sign in to comment.