-
Notifications
You must be signed in to change notification settings - Fork 5
57 lines (45 loc) · 1.26 KB
/
Copy pathjavascript-test.yml
File metadata and controls
57 lines (45 loc) · 1.26 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
47
48
49
50
51
52
53
54
55
56
57
name: JavaScript Tests
on:
push:
branches: [main]
paths:
- 'packages/javascript/**'
- 'packages/rust/wasm/**'
- 'packages/rust/core/**'
- '.github/workflows/javascript-test.yml'
pull_request:
paths:
- 'packages/javascript/**'
- 'packages/rust/wasm/**'
- 'packages/rust/core/**'
- '.github/workflows/javascript-test.yml'
workflow_dispatch:
defaults:
run:
working-directory: packages/javascript
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2
with:
workspaces: packages/rust
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Build WASM
working-directory: .
run: wasm-pack build packages/rust/wasm --target bundler --out-dir ../../javascript/src/wasm-core
- uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: bun install
- name: Type check
run: bun run type-check
- name: Run tests
run: bun run test
- name: Build
run: bun run build