From b4acdb08bb470ab2112b116398dab78a55645993 Mon Sep 17 00:00:00 2001 From: Mikhail Bashkirov Date: Fri, 31 Jan 2025 17:17:02 +0100 Subject: [PATCH 1/4] chore: bump pipelines Ubuntu to latest 24.04 --- .github/workflows/canary.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/verify-browser.yml | 2 +- .github/workflows/verify-node.yml | 2 +- .github/workflows/verify-storybook-builder.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/canary.yml b/.github/workflows/canary.yml index 8ac867f2d..dfd2d679b 100644 --- a/.github/workflows/canary.yml +++ b/.github/workflows/canary.yml @@ -12,7 +12,7 @@ jobs: # Prevents changesets action from creating a PR on forks if: github.repository == 'modernweb-dev/web' name: Pre-release - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Checkout Repo uses: actions/checkout@v4 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2a803576d..03ec43ac5 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -9,7 +9,7 @@ jobs: linux: timeout-minutes: 30 name: Linux - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bfb8d35c7..c998c4362 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ jobs: # Prevents changesets action from creating a PR on forks if: github.repository == 'modernweb-dev/web' name: Release - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Checkout Repo uses: actions/checkout@v4 diff --git a/.github/workflows/verify-browser.yml b/.github/workflows/verify-browser.yml index 5df8ff0bb..412d9689f 100644 --- a/.github/workflows/verify-browser.yml +++ b/.github/workflows/verify-browser.yml @@ -9,7 +9,7 @@ jobs: verify-linux: timeout-minutes: 30 name: Linux - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/verify-node.yml b/.github/workflows/verify-node.yml index 3f13b5e71..d48a75a1c 100644 --- a/.github/workflows/verify-node.yml +++ b/.github/workflows/verify-node.yml @@ -9,7 +9,7 @@ jobs: verify-linux: timeout-minutes: 30 name: Linux - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 strategy: fail-fast: false matrix: diff --git a/.github/workflows/verify-storybook-builder.yml b/.github/workflows/verify-storybook-builder.yml index 23884b46a..fef72d71e 100644 --- a/.github/workflows/verify-storybook-builder.yml +++ b/.github/workflows/verify-storybook-builder.yml @@ -7,7 +7,7 @@ jobs: strategy: fail-fast: false matrix: - runs-on: [ubuntu-22.04, windows-2022] + runs-on: [ubuntu-24.04, windows-2022] runs-on: ${{ matrix.runs-on }} name: ${{ matrix.runs-on }} timeout-minutes: 60 From 87c458bc49d4e465b1d4b26dfb6b97cdfe5bfb10 Mon Sep 17 00:00:00 2001 From: Mikhail Bashkirov Date: Fri, 31 Jan 2025 17:30:51 +0100 Subject: [PATCH 2/4] chore: bump playwright version to latest which works in GitHub Actions Ubuntu 24.04 --- package-lock.json | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/package-lock.json b/package-lock.json index ea5bd2f01..6b4e4d69d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4057,22 +4057,18 @@ } }, "node_modules/@playwright/test": { - "version": "1.36.1", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.36.1.tgz", - "integrity": "sha512-YK7yGWK0N3C2QInPU6iaf/L3N95dlGdbsezLya4n0ZCh3IL7VgPGxC6Gnznh9ApWdOmkJeleT2kMTcWPRZvzqg==", + "version": "1.50.0", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.50.0.tgz", + "integrity": "sha512-ZGNXbt+d65EGjBORQHuYKj+XhCewlwpnSd/EDuLPZGSiEWmgOJB5RmMCCYGy5aMfTs9wx61RivfDKi8H/hcMvw==", "dev": true, "dependencies": { - "@types/node": "*", - "playwright-core": "1.36.1" + "playwright": "1.50.0" }, "bin": { "playwright": "cli.js" }, "engines": { - "node": ">=16" - }, - "optionalDependencies": { - "fsevents": "2.3.2" + "node": ">=18" } }, "node_modules/@pnpm/config.env-replace": { @@ -25403,31 +25399,31 @@ } }, "node_modules/playwright": { - "version": "1.36.1", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.36.1.tgz", - "integrity": "sha512-2ZqHpD0U0COKR8bqR3W5IkyIAAM0mT9FgGJB9xWCI1qAUkqLxJskA1ueeQOTH2Qfz3+oxdwwf2EzdOX+RkZmmQ==", - "hasInstallScript": true, - "license": "Apache-2.0", + "version": "1.50.0", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.50.0.tgz", + "integrity": "sha512-+GinGfGTrd2IfX1TA4N2gNmeIksSb+IAe589ZH+FlmpV3MYTx6+buChGIuDLQwrGNCw2lWibqV50fU510N7S+w==", "dependencies": { - "playwright-core": "1.36.1" + "playwright-core": "1.50.0" }, "bin": { "playwright": "cli.js" }, "engines": { - "node": ">=16" + "node": ">=18" + }, + "optionalDependencies": { + "fsevents": "2.3.2" } }, "node_modules/playwright-core": { - "version": "1.36.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.36.1.tgz", - "integrity": "sha512-7+tmPuMcEW4xeCL9cp9KxmYpQYHKkyjwoXRnoeTowaeNat8PoBMk/HwCYhqkH2fRkshfKEOiVus/IhID2Pg8kg==", - "license": "Apache-2.0", + "version": "1.50.0", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.50.0.tgz", + "integrity": "sha512-CXkSSlr4JaZs2tZHI40DsZUN/NIwgaUPsyLuOAaIZp2CyF2sN5MM5NJsyB188lFSSozFxQ5fPT4qM+f0tH/6wQ==", "bin": { "playwright-core": "cli.js" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/please-upgrade-node": { From a9a652049fee7b5ff46bf6aa4937ee8f7407598d Mon Sep 17 00:00:00 2001 From: Mikhail Bashkirov Date: Mon, 3 Feb 2025 15:32:23 +0100 Subject: [PATCH 3/4] chore: workaround for Chrome sandbox in Ubuntu 24.04 --- .github/workflows/verify-browser.yml | 5 +++++ .github/workflows/verify-node.yml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/.github/workflows/verify-browser.yml b/.github/workflows/verify-browser.yml index 412d9689f..73cf0e35a 100644 --- a/.github/workflows/verify-browser.yml +++ b/.github/workflows/verify-browser.yml @@ -14,6 +14,11 @@ jobs: steps: - uses: actions/checkout@v4 + # TODO: remove when GitHub fixes this https://github.com/actions/runner-images/issues/10015 + # (this workaround is practically the same what Playwright did in https://github.com/microsoft/playwright/pull/34238/files) + - name: Workaround for Chrome sandbox issue in Ubuntu 24.04 + run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 + - name: Setup Node 20 uses: actions/setup-node@v4 env: diff --git a/.github/workflows/verify-node.yml b/.github/workflows/verify-node.yml index d48a75a1c..d2d8f6461 100644 --- a/.github/workflows/verify-node.yml +++ b/.github/workflows/verify-node.yml @@ -22,6 +22,11 @@ jobs: steps: - uses: actions/checkout@v4 + # TODO: remove when GitHub fixes this https://github.com/actions/runner-images/issues/10015 + # (this workaround is practically the same what Playwright did in https://github.com/microsoft/playwright/pull/34238/files) + - name: Workaround for Chrome sandbox issue in Ubuntu 24.04 + run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 + - name: Setup Node ${{ matrix.node-version }} uses: actions/setup-node@v4 env: From 546763570eb26ce83c3976e13e23652a16206c32 Mon Sep 17 00:00:00 2001 From: Mikhail Bashkirov Date: Sun, 6 Apr 2025 16:46:11 +0200 Subject: [PATCH 4/4] fix: try installing browsers after npm deps as shown in playwright docs --- .github/workflows/verify-node.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/verify-node.yml b/.github/workflows/verify-node.yml index d2d8f6461..1bad6f8e3 100644 --- a/.github/workflows/verify-node.yml +++ b/.github/workflows/verify-node.yml @@ -35,15 +35,15 @@ jobs: node-version: ${{ matrix.node-version }} cache: npm - - name: Install Playwright dependencies - run: npx playwright install --with-deps - # Set up GitHub Actions caching for Wireit. - uses: google/wireit@setup-github-actions-caching/v1 - name: Install Dependencies run: npm ci + - name: Install Playwright dependencies + run: npx playwright install --with-deps + - name: Build packages run: npm run build