Skip to content

Commit 256420c

Browse files
committed
ci: Build and test on wasm32 target
1 parent a672897 commit 256420c

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/wasm.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: WASM
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
wasm:
13+
name: Build, lint, test
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
19+
- name: Install stable toolchain
20+
uses: dtolnay/rust-toolchain@stable
21+
with:
22+
targets: wasm32-unknown-unknown
23+
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v6
26+
with:
27+
node-version: '20'
28+
29+
- name: Install wasm-pack
30+
uses: taiki-e/install-action@v2
31+
with:
32+
tool: wasm-pack
33+
34+
- name: Build with wasm-pack
35+
working-directory: twenty-first
36+
run: wasm-pack build --release --target nodejs
37+
38+
- name: Run wasm-pack tests
39+
working-directory: twenty-first
40+
run: wasm-pack test --node

0 commit comments

Comments
 (0)