From 0bebba840e4714236b1eca1aa7d516115da14b31 Mon Sep 17 00:00:00 2001 From: Erik Marks <25517051+rekmarks@users.noreply.github.com> Date: Thu, 19 Feb 2026 15:06:43 -0800 Subject: [PATCH 1/3] fix(ci): extract Playwright install steps into composite action Add .github/actions/playwright-install composite action and use it in both the test and e2e jobs, eliminating duplicated cache/install steps. Also fixes the test job, which was seeing a missing-browser error due to the same root cause fixed for the e2e job in fd122f6a. Co-Authored-By: Claude Sonnet 4.6 --- .github/actions/playwright-install/action.yml | 19 +++++++++++++++++++ .github/workflows/lint-build-test.yml | 15 +++------------ 2 files changed, 22 insertions(+), 12 deletions(-) create mode 100644 .github/actions/playwright-install/action.yml diff --git a/.github/actions/playwright-install/action.yml b/.github/actions/playwright-install/action.yml new file mode 100644 index 000000000..c1f84250c --- /dev/null +++ b/.github/actions/playwright-install/action.yml @@ -0,0 +1,19 @@ +name: Install Playwright browsers +description: Cache and install Playwright Chromium browser and system dependencies + +runs: + using: composite + steps: + - name: Cache Playwright browsers + id: playwright-cache + uses: actions/cache@v4 + with: + path: ~/.cache/ms-playwright + key: playwright-${{ runner.os }}-${{ hashFiles('yarn.lock') }} + - name: Install Playwright browsers + if: steps.playwright-cache.outputs.cache-hit != 'true' + run: yarn playwright install chromium + shell: bash + - name: Install Playwright system dependencies + run: yarn playwright install-deps chromium + shell: bash diff --git a/.github/workflows/lint-build-test.yml b/.github/workflows/lint-build-test.yml index 7b20169ac..5ad8f7177 100644 --- a/.github/workflows/lint-build-test.yml +++ b/.github/workflows/lint-build-test.yml @@ -106,7 +106,8 @@ jobs: is-high-risk-environment: false node-version: ${{ matrix.node-version }} env: - PLAYWRIGHT_ONLY_SHELL: 1 + PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 + - uses: ./.github/actions/playwright-install - run: yarn build - run: "yarn test --coverage=${{ matrix.node-version == '24.x' && 'true' || 'false' }}" - name: Upload coverage artifact @@ -163,17 +164,7 @@ jobs: with: is-high-risk-environment: false node-version: ${{ matrix.node-version }} - - name: Cache Playwright browsers - id: playwright-cache - uses: actions/cache@v4 - with: - path: ~/.cache/ms-playwright - key: playwright-${{ runner.os }}-${{ hashFiles('yarn.lock') }} - - name: Install Playwright browsers - if: steps.playwright-cache.outputs.cache-hit != 'true' - run: yarn playwright install chromium - - name: Install Playwright system dependencies - run: yarn playwright install-deps chromium + - uses: ./.github/actions/playwright-install - run: VITE_DB_FOLDER=e2e yarn build - name: Run E2E tests id: e2e From 387e573762297a5062a6b8e2e7c7a7c354778a77 Mon Sep 17 00:00:00 2001 From: Erik Marks <25517051+rekmarks@users.noreply.github.com> Date: Thu, 19 Feb 2026 15:15:56 -0800 Subject: [PATCH 2/3] fix(ci): simplify Playwright install to always use --with-deps Co-Authored-By: Claude Sonnet 4.6 --- .github/actions/playwright-install/action.yml | 3 ++- scripts/playwright-install.sh | 11 +---------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/actions/playwright-install/action.yml b/.github/actions/playwright-install/action.yml index c1f84250c..bf935813a 100644 --- a/.github/actions/playwright-install/action.yml +++ b/.github/actions/playwright-install/action.yml @@ -12,8 +12,9 @@ runs: key: playwright-${{ runner.os }}-${{ hashFiles('yarn.lock') }} - name: Install Playwright browsers if: steps.playwright-cache.outputs.cache-hit != 'true' - run: yarn playwright install chromium + run: yarn playwright install --with-deps chromium shell: bash - name: Install Playwright system dependencies + if: steps.playwright-cache.outputs.cache-hit == 'true' run: yarn playwright install-deps chromium shell: bash diff --git a/scripts/playwright-install.sh b/scripts/playwright-install.sh index 7a5251241..15a273685 100755 --- a/scripts/playwright-install.sh +++ b/scripts/playwright-install.sh @@ -12,13 +12,4 @@ if [ "$PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD" = "1" ]; then exit 0 fi -# Install Chromium (with system deps in CI, headless shell only if requested) -if [ "$CI" = "true" ]; then - if [ "$PLAYWRIGHT_ONLY_SHELL" = "1" ]; then - yarn playwright install --with-deps --only-shell chromium - else - yarn playwright install --with-deps chromium - fi -else - yarn playwright install chromium -fi +yarn playwright install --with-deps chromium From d6a63a2a34658ba45d1efd0f8dc28d6d5a6252b2 Mon Sep 17 00:00:00 2001 From: Erik Marks <25517051+rekmarks@users.noreply.github.com> Date: Thu, 19 Feb 2026 15:20:38 -0800 Subject: [PATCH 3/3] fix(ci): use $CI to skip Playwright install instead of custom env var The postinstall script now checks $CI (always true in GitHub Actions) instead of PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD, removing the need to set that env var in every job. Also removes the now-redundant Dependabot check since Dependabot runs in CI. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/lint-build-test.yml | 12 ------------ scripts/playwright-install.sh | 12 +++--------- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/.github/workflows/lint-build-test.yml b/.github/workflows/lint-build-test.yml index 5ad8f7177..dabd8a939 100644 --- a/.github/workflows/lint-build-test.yml +++ b/.github/workflows/lint-build-test.yml @@ -17,8 +17,6 @@ jobs: cache-node-modules: true is-high-risk-environment: false node-version: ${{ matrix.node-version }} - env: - PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 lint: name: Lint @@ -33,8 +31,6 @@ jobs: with: is-high-risk-environment: false node-version: ${{ matrix.node-version }} - env: - PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 - run: yarn lint - name: Require clean working directory shell: bash @@ -57,8 +53,6 @@ jobs: with: is-high-risk-environment: false node-version: ${{ matrix.node-version }} - env: - PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 - run: yarn changelog:validate - name: Require clean working directory shell: bash @@ -81,8 +75,6 @@ jobs: with: is-high-risk-environment: false node-version: ${{ matrix.node-version }} - env: - PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 - run: yarn build - name: Require clean working directory shell: bash @@ -105,8 +97,6 @@ jobs: with: is-high-risk-environment: false node-version: ${{ matrix.node-version }} - env: - PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 - uses: ./.github/actions/playwright-install - run: yarn build - run: "yarn test --coverage=${{ matrix.node-version == '24.x' && 'true' || 'false' }}" @@ -138,8 +128,6 @@ jobs: with: is-high-risk-environment: false node-version: ${{ matrix.node-version }} - env: - PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 - run: yarn build - run: yarn test:integration - name: Require clean working directory diff --git a/scripts/playwright-install.sh b/scripts/playwright-install.sh index 15a273685..96839475f 100755 --- a/scripts/playwright-install.sh +++ b/scripts/playwright-install.sh @@ -1,14 +1,8 @@ #!/bin/bash -# Skip in Dependabot environments (not needed and causes failures) -if "$(dirname "$0")/utils/check-dependabot.sh"; then - echo "⏭️ Skipping Playwright install in Dependabot environment" - exit 0 -fi - -# Also respect PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD for CI environments -if [ "$PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD" = "1" ]; then - echo "⏭️ Skipping Playwright install (PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1)" +# In CI, browsers are installed separately via the playwright-install composite action +if [ "$CI" = "true" ]; then + echo "⏭️ Skipping Playwright install in CI" exit 0 fi