-
Notifications
You must be signed in to change notification settings - Fork 2
46 lines (37 loc) · 1.11 KB
/
Copy pathnodejs.yml
File metadata and controls
46 lines (37 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: NodeJS CI
on:
pull_request:
branches: ["main"]
jobs:
node_test:
name: "Node.js test"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: latest
cache: 'npm'
cache-dependency-path: nodejs/package-lock.json
- working-directory: nodejs
run: npm install
- name: Install wasm target
run: |
rustup target add wasm32-unknown-unknown
- name: Get wasm-bindgen version
id: wasm-bindgen-version
run: |
VERSION=$(grep -A 1 'name = "wasm-bindgen"' Cargo.lock | grep version | sed 's/.*"\(.*\)".*/\1/')
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Install wasm-bindgen-cli
uses: taiki-e/install-action@v2
with:
tool: wasm-bindgen-cli@${{ steps.wasm-bindgen-version.outputs.version }}
- name: Build the wasm module
working-directory: nodejs
run: |
npm run build
- name: Run the tests
working-directory: nodejs
run: |
npm test