Skip to content

Commit d5055f3

Browse files
mydeaclaude
andcommitted
chore(ci): Use Playwright Docker images instead of install-playwright action
Replace the custom `install-playwright` composite action with official Playwright Docker images for browser integration tests, and inline `npx playwright install` for other jobs. **Browser integration tests** (playwright + loader): - Use `mcr.microsoft.com/playwright:v1.56.1-noble` container image - Browsers are pre-installed, no download or caching needed **Remix, E2E, canary, flaky-test-detector**: - Replace composite action with `npx playwright install --with-deps chromium` - These jobs have complex setups (Node version matrix, pnpm, Verdaccio) where a container adds unnecessary complexity This also removes the `actions/cache@v4` usage from the composite action, eliminating another source of Node.js 20 deprecation warnings. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ac0d888 commit d5055f3

File tree

4 files changed

+16
-80
lines changed

4 files changed

+16
-80
lines changed

.github/actions/install-playwright/action.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,8 @@ jobs:
478478
needs: [job_get_metadata, job_build]
479479
if: needs.job_build.outputs.changed_browser_integration == 'true' || github.event_name != 'pull_request'
480480
runs-on: ubuntu-24.04-large-js
481+
container:
482+
image: mcr.microsoft.com/playwright:v1.56.1-noble
481483
timeout-minutes: 25
482484
strategy:
483485
fail-fast: false
@@ -535,16 +537,13 @@ jobs:
535537
uses: actions/setup-node@v6
536538
with:
537539
node-version-file: 'package.json'
540+
- name: Install yarn
541+
run: npm install -g yarn@1.22.22
538542
- name: Restore caches
539543
uses: ./.github/actions/restore-cache
540544
with:
541545
dependency_cache_key: ${{ needs.job_build.outputs.dependency_cache_key }}
542546

543-
- name: Install Playwright
544-
uses: ./.github/actions/install-playwright
545-
with:
546-
browsers: ${{ matrix.project }}
547-
548547
- name: Run Playwright tests
549548
env:
550549
PW_BUNDLE: ${{ matrix.bundle }}
@@ -581,6 +580,8 @@ jobs:
581580
needs: [job_get_metadata, job_build]
582581
if: needs.job_build.outputs.changed_browser_integration == 'true' || github.event_name != 'pull_request'
583582
runs-on: ubuntu-24.04
583+
container:
584+
image: mcr.microsoft.com/playwright:v1.56.1-noble
584585
timeout-minutes: 15
585586
strategy:
586587
fail-fast: false
@@ -603,16 +604,13 @@ jobs:
603604
uses: actions/setup-node@v6
604605
with:
605606
node-version-file: 'package.json'
607+
- name: Install yarn
608+
run: npm install -g yarn@1.22.22
606609
- name: Restore caches
607610
uses: ./.github/actions/restore-cache
608611
with:
609612
dependency_cache_key: ${{ needs.job_build.outputs.dependency_cache_key }}
610613

611-
- name: Install Playwright
612-
uses: ./.github/actions/install-playwright
613-
with:
614-
browsers: chromium
615-
616614
- name: Run Playwright Loader tests
617615
env:
618616
PW_BUNDLE: ${{ matrix.bundle }}
@@ -794,9 +792,7 @@ jobs:
794792
dependency_cache_key: ${{ needs.job_build.outputs.dependency_cache_key }}
795793

796794
- name: Install Playwright
797-
uses: ./.github/actions/install-playwright
798-
with:
799-
browsers: chromium
795+
run: npx playwright install --with-deps chromium
800796

801797
- name: Run integration tests
802798
env:
@@ -957,10 +953,8 @@ jobs:
957953
SENTRY_E2E_WORKSPACE_ROOT: ${{ github.workspace }}
958954

959955
- name: Install Playwright
960-
uses: ./.github/actions/install-playwright
961-
with:
962-
browsers: chromium
963-
cwd: ${{ runner.temp }}/test-application
956+
run: npx playwright install --with-deps chromium
957+
working-directory: ${{ runner.temp }}/test-application
964958

965959
- name: Run E2E test
966960
working-directory: ${{ runner.temp }}/test-application
@@ -1072,10 +1066,8 @@ jobs:
10721066
run: ${{ matrix.build-command || 'pnpm test:build' }}
10731067

10741068
- name: Install Playwright
1075-
uses: ./.github/actions/install-playwright
1076-
with:
1077-
browsers: chromium
1078-
cwd: ${{ runner.temp }}/test-application
1069+
run: npx playwright install --with-deps chromium
1070+
working-directory: ${{ runner.temp }}/test-application
10791071

10801072
- name: Run E2E test
10811073
working-directory: ${{ runner.temp }}/test-application

.github/workflows/canary.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,8 @@ jobs:
165165
run: yarn ${{ matrix.build-command }}
166166

167167
- name: Install Playwright
168-
uses: ./.github/actions/install-playwright
169-
with:
170-
browsers: chromium
171-
cwd: ${{ runner.temp }}/test-application
168+
run: npx playwright install --with-deps chromium
169+
working-directory: ${{ runner.temp }}/test-application
172170

173171
- name: Run E2E test
174172
working-directory: ${{ runner.temp }}/test-application

.github/workflows/flaky-test-detector.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,7 @@ jobs:
5050
run: yarn build
5151

5252
- name: Install Playwright
53-
uses: ./.github/actions/install-playwright
54-
with:
55-
browsers: 'chromium'
53+
run: npx playwright install --with-deps chromium
5654

5755
- name: Determine changed tests
5856
uses: dorny/paths-filter@v4.0.1

0 commit comments

Comments
 (0)