2323 - uses : actions/checkout@v4
2424 - uses : actions/setup-node@v4
2525 with :
26- node-version : 24.x
26+ node-version : lts/*
2727 cache : ' yarn'
2828
2929 - name : Restore Yarn Cache
@@ -92,17 +92,23 @@ jobs:
9292 edit-mode : ' replace'
9393
9494 e2e :
95+ name : Run Playwright tests
9596 if : github.event_name == 'pull_request'
9697 needs : deploy
9798 runs-on : ubuntu-latest
9899 permissions :
99100 contents : read
100- timeout-minutes : 10
101+ strategy :
102+ fail-fast : false
103+ matrix :
104+ shardIndex : [1, 2, 3, 4]
105+ shardTotal : [4]
106+ timeout-minutes : 20
101107 steps :
102108 - uses : actions/checkout@v4
103109 - uses : actions/setup-node@v4
104110 with :
105- node-version : 24.x
111+ node-version : lts/*
106112 cache : ' yarn'
107113 - name : Validate deployment URL
108114 run : |
@@ -119,18 +125,21 @@ jobs:
119125 yarn-modules-${{ runner.arch }}-${{ runner.os }}-
120126 - name : Install dependencies
121127 run : yarn -D
122- - run : npx playwright install --with-deps
123- - run : yarn test:e2e
128+ - name : Install Playwright dependencies
129+ run : npx playwright install --with-deps
130+ - run : yarn test:e2e --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
124131 env :
125132 PLAYWRIGHT_BASE_URL : ${{ needs.deploy.outputs.deployment-url }}
126- - uses : actions/upload-artifact@v4
133+ - name : Upload blob report to GitHub Actions Artifacts
127134 if : ${{ !cancelled() }}
135+ uses : actions/upload-artifact@v4
128136 with :
129- name : playwright -report
130- path : playwright -report/
131- retention-days : 7
137+ name : blob -report-${{ matrix.shardIndex }}
138+ path : blob -report
139+ retention-days : 1
132140
133141 check_formatting :
142+ name : Check code formatting
134143 if : github.event_name == 'pull_request'
135144 runs-on : ubuntu-latest
136145 permissions :
@@ -140,7 +149,7 @@ jobs:
140149 - uses : actions/checkout@v4
141150 - uses : actions/setup-node@v4
142151 with :
143- node-version : 24.x
152+ node-version : lts/*
144153 cache : ' yarn'
145154 - name : Restore Yarn Cache
146155 uses : actions/cache@v4
@@ -151,3 +160,41 @@ jobs:
151160 yarn-modules-${{ runner.arch }}-${{ runner.os }}-
152161 - run : yarn -D
153162 - run : yarn format:check
163+
164+ merge-reports :
165+ name : Merge Playwright Reports
166+ if : ${{ !cancelled() }}
167+ needs : [e2e]
168+ runs-on : ubuntu-latest
169+ permissions :
170+ contents : read
171+ steps :
172+ - uses : actions/checkout@v5
173+ - uses : actions/setup-node@v5
174+ with :
175+ node-version : lts/*
176+ - name : Restore Yarn Cache
177+ uses : actions/cache@v4
178+ with :
179+ path : node_modules
180+ key : yarn-modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-dev
181+ restore-keys : |
182+ yarn-modules-${{ runner.arch }}-${{ runner.os }}-
183+ - name : Install dependencies
184+ run : yarn -D
185+ - name : Download blob reports from GitHub Actions Artifacts
186+ uses : actions/download-artifact@v5
187+ with :
188+ path : all-blob-reports
189+ pattern : blob-report-*
190+ merge-multiple : true
191+
192+ - name : Merge into HTML Report
193+ run : npx playwright merge-reports --reporter html ./all-blob-reports
194+
195+ - name : Upload HTML report
196+ uses : actions/upload-artifact@v4
197+ with :
198+ name : html-report--attempt-${{ github.run_attempt }}
199+ path : playwright-report
200+ retention-days : 14
0 commit comments