CI: do not test Webkit on Linux

The tests work correctly in Epiphany, but not in the WebKit build,
where the native X25519 implementation throws non-standard errors on
importKey (DataError) and generateKey (OperationError).
Patching this would be simply a matter of catching such errors and falling back
to the JS implementation, but since only the CI WebKit build seems to be
affected, we prefer not to relax fallback checks in the context of crypto
operations without issues reported in the wild.
This commit is contained in:
larabr 2025-02-25 14:49:08 +01:00
parent d5689894f6
commit 4762d2c762
2 changed files with 7 additions and 4 deletions

View File

@ -106,6 +106,7 @@ jobs:
npx playwright install --with-deps firefox
- name: Install WebKit # caching not possible, external shared libraries required
if: ${{ matrix.runner == 'macos-latest' }} # do not install on ubuntu, since the X25519 WebCrypto implementation has issues
run: npx playwright install --with-deps webkit
- name: Run browser tests

View File

@ -1,10 +1,10 @@
import { playwrightLauncher } from '@web/test-runner-playwright';
import { existsSync } from 'fs';
import { playwrightLauncher, playwright } from '@web/test-runner-playwright';
const sharedPlaywrightCIOptions = {
// createBrowserContext: ({ browser }) => browser.newContext({ ignoreHTTPSErrors: true }),
headless: true
};
export default {
nodeResolve: true, // to resolve npm module imports in `unittests.html`
files: './test/unittests.html',
@ -29,11 +29,13 @@ export default {
...sharedPlaywrightCIOptions,
product: 'firefox'
}),
playwrightLauncher({
// try setting up webkit, but ignore if not available
// (e.g. on ubuntu, where we don't want to test webkit as the WebCrypto X25519 implementation has issues)
existsSync(playwright.webkit.executablePath()) && playwrightLauncher({
...sharedPlaywrightCIOptions,
product: 'webkit'
})
]
].filter(Boolean)
}
]
};