Skip to content

Commit b457968

Browse files
Install Chromium for Playwright in CI
1 parent 0bfe501 commit b457968

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

.github/workflows/swift.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
- name: Install dependencies for macOS
4848
run: brew bundle
4949

50-
- run: npm install
50+
- run: npm install && npx playwright install chromium
5151

5252
- name: Build the project
5353
run: swift build --build-tests
@@ -91,7 +91,7 @@ jobs:
9191
sudo apt-get update && sudo apt-get install -y
9292
wabt binaryen
9393
94-
- run: npm install
94+
- run: npm install && npx playwright install chromium
9595

9696
- name: Install WebAssembly runtime
9797
uses: bytecodealliance/actions/wasmtime/setup@v1

Sources/CartonHelpers/StaticArchive.swift

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

entrypoint/intrinsics.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,11 @@ export async function testBrowser(instantiate: Instantiate, wasmFileName: string
218218
return await import("playwright")
219219
} catch {
220220
// Playwright is not available in the current environment
221-
console.error("Playwright is not available in the current environment. Please install it by running `npm install playwright`.");
221+
console.error(`Playwright is not available in the current environment.
222+
Please run the following command to install it:
223+
224+
$ npm install playwright && npx playwright install chromium
225+
`);
222226
process.exit(1);
223227
}
224228
})();

0 commit comments

Comments
 (0)