Skip to content

Commit 1491d0b

Browse files
committed
fix(tests): Add Firefox to CI integration tests and update jsdom
The GitHub Actions workflow now runs integration tests on both Chromium and Firefox browsers, with Playwright browser installation and caching updated accordingly. Coverage is only collected for Chromium runs. Updated jsdom to 27.4.0 and adjusted related dependencies. Added a .yarnrc file to suppress npm 11.x warnings.
1 parent 749f1ef commit 1491d0b

File tree

169 files changed

+5013
-4115
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

169 files changed

+5013
-4115
lines changed

.github/workflows/main.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -138,13 +138,14 @@ jobs:
138138
retention-days: 1
139139

140140
integration-tests:
141-
name: Integration Tests (Shard ${{ matrix.shard }}/${{ strategy.job-total }})
141+
name: Integration (${{ matrix.browser }}, Shard ${{ matrix.shard }}/4)
142142
needs: build-and-unit
143143
if: github.actor != 'dependabot[bot]'
144144
runs-on: ubuntu-latest
145145
strategy:
146146
fail-fast: false
147147
matrix:
148+
browser: [chromium, firefox]
148149
shard: [ 1, 2, 3, 4 ]
149150
steps:
150151
- name: Checkout code
@@ -170,37 +171,37 @@ jobs:
170171
id: playwright-cache
171172
with:
172173
path: ~/.cache/ms-playwright
173-
key: playwright-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
174+
key: playwright-${{ runner.os }}-${{ matrix.browser }}-${{ hashFiles('package-lock.json') }}
174175

175-
- name: Install Playwright browsers
176+
- name: Install Playwright browser
176177
if: steps.playwright-cache.outputs.cache-hit != 'true'
177-
run: npx playwright install --with-deps
178+
run: npx playwright install --with-deps ${{ matrix.browser }}
178179

179180
- name: Install Playwright deps only
180181
if: steps.playwright-cache.outputs.cache-hit == 'true'
181-
run: npx playwright install-deps
182+
run: npx playwright install-deps ${{ matrix.browser }}
182183

183184
- name: Create coverage directories
184185
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
185186
run: mkdir -p coverage/e2e/shard-${{ matrix.shard }}
186187

187-
- name: Run integration tests (shard ${{ matrix.shard }}/4)
188+
- name: Run integration tests (${{ matrix.browser }}, shard ${{ matrix.shard }}/4)
188189
env:
189-
COVERAGE: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && 'true' || 'false' }}
190+
COVERAGE: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && matrix.browser == 'chromium' && 'true' || 'false' }}
190191
SHARD_INDEX: ${{ matrix.shard }}
191-
run: npx playwright test --project=chromium --shard=${{ matrix.shard }}/4
192+
run: npx playwright test --project=${{ matrix.browser }} --shard=${{ matrix.shard }}/4
192193

193194
- name: Upload test results
194195
if: always()
195196
uses: actions/upload-artifact@v6
196197
with:
197-
name: playwright-results-shard-${{ matrix.shard }}
198+
name: playwright-results-${{ matrix.browser }}-shard-${{ matrix.shard }}
198199
path: test-results/
199200
retention-days: 7
200201
if-no-files-found: ignore
201202

202203
- name: Upload coverage artifact
203-
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
204+
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && matrix.browser == 'chromium'
204205
uses: actions/upload-artifact@v6
205206
with:
206207
name: coverage-shard-${{ matrix.shard }}

.yarnrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Disable yarn's npm config passthrough to avoid warnings with npm 11.x
2+
version-git-tag false
3+
version-commit-hooks false
4+
version-git-message ""
5+
version-tag-prefix ""

0 commit comments

Comments
 (0)