Skip to content

Commit 2025b26

Browse files
committed
update ci
1 parent e0dee91 commit 2025b26

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.github/workflows/go.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,23 @@ jobs:
2828
- name: Install wasmbrowsertest
2929
run: |
3030
go install github.com/agnivade/wasmbrowsertest@latest
31-
# Rename for automatic discovery as per your guide
3231
mv "$(go env GOPATH)/bin/wasmbrowsertest" "$(go env GOPATH)/bin/go_js_wasm_exec"
3332
33+
- name: Install Chrome
34+
uses: browser-actions/setup-chrome@latest
35+
36+
- name: Shim Chrome with --no-sandbox
37+
run: |
38+
CHROME_BIN=$(which google-chrome)
39+
sudo mv "$CHROME_BIN" "$CHROME_BIN.real"
40+
echo '#!/bin/sh' | sudo tee "$CHROME_BIN"
41+
echo 'exec "$0.real" --no-sandbox "$@"' | sudo tee -a "$CHROME_BIN"
42+
sudo chmod +x "$CHROME_BIN"
43+
3444
- name: Run WASM Tests
35-
# ensure Chrome/Chromium is available (included in ubuntu-latest)
3645
run: GOOS=js GOARCH=wasm go test -v ./...
46+
env:
47+
GOWASM_BROWSER_ARGS: "--no-sandbox --headless --disable-gpu --disable-dev-shm-usage"
3748

3849
build-and-release:
3950
needs: tests # only release if security AND all tests pass

0 commit comments

Comments
 (0)