From a16add6d48885e887df9c6c336c1a486e20c658b Mon Sep 17 00:00:00 2001 From: legobt <6wbvkn0j@anonaddy.me> Date: Wed, 16 Oct 2024 21:07:52 +0000 Subject: [PATCH 1/4] ci: use npm-exec instead of npx to run playwright --- .github/workflows/browser-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/browser-test.yml b/.github/workflows/browser-test.yml index 1ced54bd28..efa4872c73 100644 --- a/.github/workflows/browser-test.yml +++ b/.github/workflows/browser-test.yml @@ -41,10 +41,10 @@ jobs: run: npm ci --ignore-scripts - name: Install Playwright Browsers working-directory: browser-test - run: npx playwright install --with-deps + run: npm exec playwright install --with-deps - name: Run Playwright tests working-directory: browser-test - run: npx playwright test + run: npm exec playwright test - uses: actions/upload-artifact@v3 if: always() with: From 006721a93b7eea8d4847a5f2855afb1fba3c9c6f Mon Sep 17 00:00:00 2001 From: legobt <6wbvkn0j@anonaddy.me> Date: Wed, 16 Oct 2024 23:09:52 +0000 Subject: [PATCH 2/4] devDeps(test): @playwright/test@^1.48.1 --- browser-test/package-lock.json | 30 +++++++++++++++--------------- browser-test/package.json | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/browser-test/package-lock.json b/browser-test/package-lock.json index d725702e56..5e0c9bb253 100644 --- a/browser-test/package-lock.json +++ b/browser-test/package-lock.json @@ -8,23 +8,23 @@ "name": "browser-test", "license": "Apache-2.0", "devDependencies": { - "@playwright/test": "^1.41.2", + "@playwright/test": "^1.48.1", "@types/node": "^20.11.16" } }, "node_modules/@playwright/test": { - "version": "1.41.2", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.41.2.tgz", - "integrity": "sha512-qQB9h7KbibJzrDpkXkYvsmiDJK14FULCCZgEcoe2AvFAS64oCirWTwzTlAYEbKaRxWs5TFesE1Na6izMv3HfGg==", + "version": "1.48.1", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.48.1.tgz", + "integrity": "sha512-s9RtWoxkOLmRJdw3oFvhFbs9OJS0BzrLUc8Hf6l2UdCNd1rqeEyD4BhCJkvzeEoD1FsK4mirsWwGerhVmYKtZg==", "dev": true, "dependencies": { - "playwright": "1.41.2" + "playwright": "1.48.1" }, "bin": { "playwright": "cli.js" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/@types/node": { @@ -51,33 +51,33 @@ } }, "node_modules/playwright": { - "version": "1.41.2", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.41.2.tgz", - "integrity": "sha512-v0bOa6H2GJChDL8pAeLa/LZC4feoAMbSQm1/jF/ySsWWoaNItvrMP7GEkvEEFyCTUYKMxjQKaTSg5up7nR6/8A==", + "version": "1.48.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.48.1.tgz", + "integrity": "sha512-j8CiHW/V6HxmbntOfyB4+T/uk08tBy6ph0MpBXwuoofkSnLmlfdYNNkFTYD6ofzzlSqLA1fwH4vwvVFvJgLN0w==", "dev": true, "dependencies": { - "playwright-core": "1.41.2" + "playwright-core": "1.48.1" }, "bin": { "playwright": "cli.js" }, "engines": { - "node": ">=16" + "node": ">=18" }, "optionalDependencies": { "fsevents": "2.3.2" } }, "node_modules/playwright-core": { - "version": "1.41.2", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.41.2.tgz", - "integrity": "sha512-VaTvwCA4Y8kxEe+kfm2+uUUw5Lubf38RxF7FpBxLPmGe5sdNkSg5e3ChEigaGrX7qdqT3pt2m/98LiyvU2x6CA==", + "version": "1.48.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.48.1.tgz", + "integrity": "sha512-Yw/t4VAFX/bBr1OzwCuOMZkY1Cnb4z/doAFSwf4huqAGWmf9eMNjmK7NiOljCdLmxeRYcGPPmcDgU0zOlzP0YA==", "dev": true, "bin": { "playwright-core": "cli.js" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/undici-types": { diff --git a/browser-test/package.json b/browser-test/package.json index 04171279eb..6d842f2061 100644 --- a/browser-test/package.json +++ b/browser-test/package.json @@ -7,7 +7,7 @@ "test": "playwright test" }, "devDependencies": { - "@playwright/test": "^1.41.2", + "@playwright/test": "^1.48.1", "@types/node": "^20.11.16" } } From deed708a01d2924a1e9215212786b8df4bb98cfd Mon Sep 17 00:00:00 2001 From: legobt <6wbvkn0j@anonaddy.me> Date: Wed, 16 Oct 2024 22:44:52 +0000 Subject: [PATCH 3/4] ci(browser-test): runs-on ubuntu-24.04 --- .github/workflows/browser-test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/browser-test.yml b/.github/workflows/browser-test.yml index efa4872c73..9242a5d628 100644 --- a/.github/workflows/browser-test.yml +++ b/.github/workflows/browser-test.yml @@ -9,7 +9,8 @@ on: jobs: browser-tests: timeout-minutes: 30 - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 + # runs-on: ubuntu-latest # This Chrome nightly image can no longer install browsers in Github CI for # lack of some system dependencies: # Package 'libasound2' has no installation candidate From c0acd953aab8cf1231bd4ab6b8225defe32a0464 Mon Sep 17 00:00:00 2001 From: legobt <6wbvkn0j@anonaddy.me> Date: Wed, 16 Oct 2024 21:32:57 +0000 Subject: [PATCH 4/4] ci: manually install playwright system dependencies --- .github/workflows/browser-test.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/browser-test.yml b/.github/workflows/browser-test.yml index 9242a5d628..59b2a4ea56 100644 --- a/.github/workflows/browser-test.yml +++ b/.github/workflows/browser-test.yml @@ -24,9 +24,20 @@ jobs: # ## the Selenium image is configured to not run as root, so we have to undo some of it # env: # HOME: /root # Firefox complains otherwise + env: + DEBIAN_FRONTEND: noninteractive steps: - name: Put unstable chrome where playwright would look for it run: mv /opt/google/chrome /opt/google/chrome-unstable + - name: Install browser dependencies + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends \ + ca-certificates \ + libatomic1 libflite1 libgles2 libharfbuzz-icu0 libhyphen0 libmanette-0.2-0 libicu74 libsecret-1-0 libxslt1.1 woff2 \ + ca-certificates fonts-liberation libatk-bridge2.0-0 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 lsb-release wget xdg-utils \ + libvpx9 libevent-2.1-7t64 libopus0 libgstreamer-plugins-base1.0-0 libgstreamer-gl1.0-0 libgstreamer-plugins-bad1.0-0 gstreamer1.0-libav + - uses: actions/checkout@v4 - uses: actions/setup-node@v3 with: