Update wasm tracing (#153) #638
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Wasm | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build-lint-test-audit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: Install wasm-pack | |
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
- name: Install dependencies | |
run: cd ./keyhive_wasm && npm i | |
- name: Install Playwright Browsers | |
run: cd ./keyhive_wasm && pnpm i && pnpm exec playwright install --with-deps | |
- name: Test on Wasm | |
run: wasm-pack test --node keyhive_wasm | |
- name: Test in browsers | |
run: wasm-pack build ./keyhive_wasm --release --target=web && cd ./keyhive_wasm && pnpm i && npm install --global http-server && pnpm exec playwright test |