Repository navigation
67 lines (53 loc) · 1.6 KB
/
Copy pathjavascript-test.yml
File metadata and controls
67 lines (53 loc) · 1.6 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
58
59
60
61
62
63
64
65
66
67
name: JavaScript Tests
on:
push:
branches: [main]
paths:
- 'packages/javascript/**'
- 'packages/rust/wasm/**'
- 'packages/rust/core/**'
- '.github/workflows/javascript-test.yml'
- 'scripts/check_enum_parity.py'
pull_request:
paths:
- 'packages/javascript/**'
- 'packages/rust/wasm/**'
- 'packages/rust/core/**'
- '.github/workflows/javascript-test.yml'
- 'scripts/check_enum_parity.py'
workflow_dispatch:
defaults:
run:
working-directory: packages/javascript
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Enum parity
working-directory: .
run: python3 scripts/check_enum_parity.py
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2
with:
workspaces: packages/rust
- name: Palette codegen drift check (idealized + measured)
working-directory: packages/rust
run: cargo run --example gen_ts_palettes -- --check
- 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 web --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