66 - main
77 pull_request :
88
9+ concurrency :
10+ group : ci-${{ github.workflow }}-${{ github.ref }}
11+ cancel-in-progress : true
12+
13+ env :
14+ CARGO_INCREMENTAL : " 0"
15+
916jobs :
10- ci :
17+ rust :
18+ name : Rust lint and unit tests
1119 runs-on : macos-latest
1220
21+ steps :
22+ - uses : actions/checkout@v4
23+
24+ - uses : dtolnay/rust-toolchain@stable
25+ with :
26+ components : rustfmt, clippy
27+
28+ - name : Cache Rust build outputs
29+ uses : actions/cache@v4
30+ with :
31+ path : |
32+ ~/.cargo/git
33+ ~/.cargo/registry
34+ server/target
35+ key : rust-${{ runner.os }}-${{ hashFiles('server/Cargo.lock', 'server/Cargo.toml', 'server/build.rs', 'server/src/**/*.rs', 'cli/**/*.m') }}
36+ restore-keys : |
37+ rust-${{ runner.os }}-
38+
39+ - name : Check Rust formatting
40+ run : cargo fmt --manifest-path server/Cargo.toml --check
41+
42+ - name : Clippy
43+ run : cargo clippy --manifest-path server/Cargo.toml --all-targets -- -D warnings
44+
45+ - name : Rust unit tests
46+ run : cargo test --manifest-path server/Cargo.toml
47+
48+ client :
49+ name : Client lint, build, and tests
50+ runs-on : ubuntu-latest
51+
1352 steps :
1453 - uses : actions/checkout@v4
1554
@@ -20,32 +59,165 @@ jobs:
2059 cache-dependency-path : |
2160 package-lock.json
2261 client/package-lock.json
62+
63+ - name : Install root dependencies
64+ run : npm ci --ignore-scripts --force
65+
66+ - name : Install client dependencies
67+ run : npm ci --prefix client
68+
69+ - name : Check Prettier formatting
70+ run : npx prettier --check .
71+
72+ - name : Typecheck client
73+ run : npm run --prefix client typecheck
74+
75+ - name : Test client
76+ run : npm run --prefix client test
77+
78+ - name : Build client
79+ run : npm run --prefix client build
80+
81+ packages :
82+ name : Packages and VS Code extension
83+ runs-on : ubuntu-latest
84+
85+ steps :
86+ - uses : actions/checkout@v4
87+
88+ - uses : actions/setup-node@v4
89+ with :
90+ node-version : 20
91+ cache : npm
92+ cache-dependency-path : |
93+ package-lock.json
2394 packages/react-native-inspector/package-lock.json
2495 packages/nativescript-inspector/package-lock.json
2596
97+ - name : Install root dependencies
98+ run : npm ci --ignore-scripts --force
99+
100+ - name : Install NativeScript inspector dependencies
101+ run : npm ci --prefix packages/nativescript-inspector
102+
103+ - name : Install React Native inspector dependencies
104+ run : npm ci --prefix packages/react-native-inspector
105+
106+ - name : Build inspector and test packages
107+ run : npm run build:packages
108+
109+ - name : Package VS Code extension
110+ run : npm run package:vscode-extension
111+
112+ build-artifacts :
113+ name : Build integration artifacts
114+ runs-on : macos-latest
115+
116+ steps :
117+ - uses : actions/checkout@v4
118+
119+ - uses : actions/setup-node@v4
120+ with :
121+ node-version : 20
122+ cache : npm
123+ cache-dependency-path : |
124+ package-lock.json
125+ client/package-lock.json
126+
26127 - uses : dtolnay/rust-toolchain@stable
128+
129+ - name : Cache Rust build outputs and fixture app
130+ uses : actions/cache@v4
27131 with :
28- components : rustfmt, clippy
132+ path : |
133+ ~/.cargo/git
134+ ~/.cargo/registry
135+ server/target
136+ .cache/simdeck/fixture
137+ key : rust-${{ runner.os }}-${{ hashFiles('server/Cargo.lock', 'server/Cargo.toml', 'server/build.rs', 'server/src/**/*.rs', 'cli/**/*.m', 'scripts/integration/fixture.mjs') }}
138+ restore-keys : |
139+ rust-${{ runner.os }}-
29140
30141 - name : Install root dependencies
31- run : npm ci
142+ run : npm ci --ignore-scripts
32143
33144 - name : Install client dependencies
34145 run : npm ci --prefix client
35146
36- - name : Install NativeScript inspector dependencies
37- run : npm ci --prefix packages/nativescript-inspector
147+ - name : Build CLI, client, and JS test API
148+ run : |
149+ npm run build:cli
150+ npm run build:client
151+ npm run build:simdeck-test
152+ npm run test:integration:fixture
38153
39- - name : Install React Native inspector dependencies
40- run : npm ci --prefix packages/react-native-inspector
154+ - name : Upload integration artifacts
155+ uses : actions/upload-artifact@v4
156+ with :
157+ name : simdeck-integration-artifacts
158+ if-no-files-found : error
159+ include-hidden-files : true
160+ path : |
161+ build/simdeck
162+ build/simdeck-bin
163+ client/dist
164+ packages/simdeck-test/dist
165+ .cache/simdeck/fixture
166+
167+ integration-cli :
168+ name : CLI simulator integration
169+ runs-on : macos-latest
170+ needs :
171+ - rust
172+ - client
173+ - packages
174+ - build-artifacts
41175
42- - name : Lint, build, and test
43- run : npm run ci
176+ steps :
177+ - uses : actions/checkout@v4
178+
179+ - uses : actions/setup-node@v4
180+ with :
181+ node-version : 20
182+
183+ - name : Download integration artifacts
184+ uses : actions/download-artifact@v4
185+ with :
186+ name : simdeck-integration-artifacts
187+ path : .
188+
189+ - name : Make CLI executable
190+ run : chmod +x build/simdeck build/simdeck-bin
44191
45192 - name : CLI simulator integration tests
46193 run : npm run test:integration:cli
47194 env :
48195 SIMDECK_INTEGRATION_VERBOSE : " 1"
49196
197+ integration-js-api :
198+ name : JS API simulator integration
199+ runs-on : macos-latest
200+ needs :
201+ - rust
202+ - client
203+ - packages
204+ - build-artifacts
205+
206+ steps :
207+ - uses : actions/checkout@v4
208+
209+ - uses : actions/setup-node@v4
210+ with :
211+ node-version : 20
212+
213+ - name : Download integration artifacts
214+ uses : actions/download-artifact@v4
215+ with :
216+ name : simdeck-integration-artifacts
217+ path : .
218+
219+ - name : Make CLI executable
220+ run : chmod +x build/simdeck build/simdeck-bin
221+
50222 - name : JS API simulator integration tests
51223 run : npm run test:integration:js-api
0 commit comments