@@ -100,14 +100,16 @@ jobs:
100100 run : cargo install wasm-tools --locked
101101 - name : Rebuild core.wasm
102102 run : bash go/ressrf/build_wasm.sh
103+ - name : Copy core.wasm to node/
104+ run : cp go/ressrf/core.wasm node/core.wasm
103105 - name : Commit if changed
104106 run : |
105- if git diff --quiet go/ressrf/core.wasm; then
107+ if git diff --quiet go/ressrf/core.wasm node/core.wasm ; then
106108 echo "core.wasm is up to date"
107109 else
108110 git config user.name "github-actions[bot]"
109111 git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
110- git add go/ressrf/core.wasm
112+ git add go/ressrf/core.wasm node/core.wasm
111113 git commit -m "chore: rebuild core.wasm [ci]"
112114 git push
113115 fi
@@ -206,3 +208,53 @@ jobs:
206208 - name : Type check (ty)
207209 working-directory : python
208210 run : uvx ty check
211+
212+ test-node :
213+ needs : [build-wasm]
214+ name : Test Node.js (${{ matrix.os }})
215+ runs-on : ${{ matrix.os }}
216+ strategy :
217+ fail-fast : false
218+ matrix :
219+ os : [ubuntu-latest, macos-latest, windows-latest]
220+ permissions :
221+ contents : read # checkout
222+ steps :
223+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
224+ with :
225+ ref : ${{ github.head_ref || github.ref_name }}
226+ persist-credentials : false
227+ - uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
228+ with :
229+ node-version : " 22"
230+ cache : npm
231+ cache-dependency-path : node/package-lock.json
232+ - name : Install
233+ working-directory : node
234+ run : npm ci
235+ - name : Test
236+ working-directory : node
237+ run : npx tsx --test tests/*.test.ts
238+
239+ lint-node :
240+ needs : [build-wasm]
241+ name : Lint Node.js
242+ runs-on : ubuntu-latest
243+ permissions :
244+ contents : read # checkout
245+ steps :
246+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
247+ with :
248+ ref : ${{ github.head_ref || github.ref_name }}
249+ persist-credentials : false
250+ - uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
251+ with :
252+ node-version : " 22"
253+ cache : npm
254+ cache-dependency-path : node/package-lock.json
255+ - name : Install
256+ working-directory : node
257+ run : npm ci
258+ - name : Type check
259+ working-directory : node
260+ run : npx tsc --noEmit
0 commit comments