Skip to content

Commit c1b4728

Browse files
committed
Add js tests in github action.
1 parent ff5f355 commit c1b4728

File tree

2 files changed

+54
-2
lines changed

2 files changed

+54
-2
lines changed

.github/workflows/example.yml

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,31 @@ jobs:
4141
with:
4242
python-version: ${{ matrix.python-version }}
4343

44-
- name: dependencies
44+
- name: build
4545
run: pip install .
4646

47-
- name: pytest
47+
- name: run
4848
run: python examples/main.py
49+
50+
javascript:
51+
runs-on: ubuntu-latest
52+
53+
strategy:
54+
fail-fast: false
55+
matrix:
56+
node-version: ['20', '22', '24']
57+
58+
steps:
59+
- uses: actions/checkout@v4
60+
61+
- uses: actions/setup-node@v4
62+
with:
63+
node-version: ${{ matrix.node-version }}
64+
65+
- uses: mymindstorm/setup-emsdk@v14
66+
67+
- name: build
68+
run: npm build emcc
69+
70+
- name: run
71+
run: node examples/main.py

.github/workflows/jest.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: jest
2+
3+
on:
4+
- pull_request
5+
- push
6+
7+
jobs:
8+
pytest:
9+
runs-on: ubuntu-latest
10+
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
node-version: ['20', '22', '24']
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- uses: actions/setup-node@v4
20+
with:
21+
node-version: ${{ matrix.node-version }}
22+
23+
- uses: mymindstorm/setup-emsdk@v14
24+
25+
- name: dependencies
26+
run: npm install --include=dev
27+
28+
- name: jest
29+
run: npm run all

0 commit comments

Comments
 (0)