Skip to content

Commit fa220c6

Browse files
committed
CI: test firefox beta release over stable one
To catch issues earlier. Playwright's Webkit and Chromium builds do not include beta channels but already point to pre-release branches (see e.g. https://playwright.dev/docs/browsers#chromium).
1 parent f906243 commit fa220c6

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
run: npx playwright install --with-deps chromium
3333

3434
- name: Install Firefox
35-
run: npx playwright install --with-deps firefox
35+
run: npx playwright install --with-deps firefox-beta
3636

3737
# do not install webkit on ubuntu, since the X25519 WebCrypto implementation
3838
# has issues, see https://github.com/openpgpjs/openpgpjs/pull/1829 .

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,11 @@ const sessionKey = await decryptSessionKey({
129129

130130
## Testing
131131
Headless Chrome (or Chromium), Firefox and Webkit are used for the tests.
132-
To install any missing browsers automatically, you can run `npx playwright install --with-deps <chromium|firefox|webkit>`. Alternatively, you can install them manually as you normally would on your platform.
132+
To install any missing browsers automatically, you can run `npx playwright install --with-deps <chromium|firefox|webkit|firefox-beta>`. Alternatively, you can install them manually as you normally would on your platform.
133133

134134
The available test commands are:
135135

136136
- `npm run test`: all browsers are tested in headless mode.
137-
- `npm run test:ci`: same as `test`, but Webkit is skipped if not installed.
137+
- `npm run test:ci`: similar to `test`, but beta browser versions are used if the vendor provides them; also, Webkit is skipped if not installed.
138138
- `npm run test:debug`: opens up a browser instance in your default browser to allow debugging the tests live
139139

test/web-test-runner.config.mjs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,21 @@ export default {
6161
browsers: [
6262
playwrightLauncher({
6363
...sharedPlaywrightCIOptions,
64+
// the Chromium project is ahead of the branded browsers, when the world is on Google Chrome N,
65+
// Playwright already supports Chromium N+1.
6466
product: 'chromium'
6567
}),
6668
playwrightLauncher({
6769
...sharedPlaywrightCIOptions,
68-
product: 'firefox'
70+
product: 'firefox',
71+
launchOptions: { channel: 'firefox-beta' }
6972
}),
7073
// try setting up webkit, but ignore if not available
7174
// (e.g. on ubuntu, where we don't want to test webkit as the WebCrypto X25519 implementation has issues)
7275
existsSync(playwright.webkit.executablePath()) && playwrightLauncher({
7376
...sharedPlaywrightCIOptions,
77+
// Playwright's WebKit is derived from the latest WebKit main branch sources,
78+
// often before these updates are incorporated into Apple Safari and other WebKit-based browsers.
7479
product: 'webkit'
7580
})
7681
].filter(Boolean)

0 commit comments

Comments
 (0)