Fix wasm-bindgen ownership issues & add #[wasm_refgen] #624
Workflow file for this run
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 --features ingest_static | |
- name: Test in browsers | |
run: wasm-pack build ./keyhive_wasm --release --target=web --features ingest_static && cd ./keyhive_wasm && pnpm i && npm install --global http-server && pnpm exec playwright test |