File tree Expand file tree Collapse file tree 4 files changed +45
-2
lines changed Expand file tree Collapse file tree 4 files changed +45
-2
lines changed Original file line number Diff line number Diff line change
1
+ name : CLI Tests
2
+
3
+ on :
4
+ push :
5
+ paths :
6
+ - " cli/**"
7
+ pull_request :
8
+ paths :
9
+ - " cli/**"
10
+
11
+ jobs :
12
+ test :
13
+ runs-on : ubuntu-latest
14
+ defaults :
15
+ run :
16
+ working-directory : ./cli
17
+ steps :
18
+ - uses : actions/checkout@v4
19
+
20
+ - name : Set up Node.js
21
+ uses : actions/setup-node@v4
22
+ with :
23
+ node-version-file : package.json
24
+ cache : npm
25
+
26
+ - name : Install dependencies
27
+ run : |
28
+ cd ..
29
+ npm ci --ignore-scripts
30
+
31
+ - name : Build CLI
32
+ run : npm run build
33
+
34
+ - name : Explicitly pre-install test dependencies
35
+ run : npx -y @modelcontextprotocol/server-everything --help || true
36
+
37
+ - name : Run tests
38
+ run : npm test
39
+ env :
40
+ NPM_CONFIG_YES : true
41
+ CI : true
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ const colors = {
12
12
13
13
import fs from "fs" ;
14
14
import path from "path" ;
15
- import { execSync , spawn } from "child_process" ;
15
+ import { spawn } from "child_process" ;
16
16
import os from "os" ;
17
17
import { fileURLToPath } from "url" ;
18
18
Original file line number Diff line number Diff line change @@ -233,7 +233,7 @@ async function main(): Promise<void> {
233
233
const args = parseArgs ( ) ;
234
234
235
235
if ( args . cli ) {
236
- runCli ( args ) ;
236
+ await runCli ( args ) ;
237
237
} else {
238
238
await runWebClient ( args ) ;
239
239
}
Original file line number Diff line number Diff line change @@ -287,6 +287,8 @@ async function main(): Promise<void> {
287
287
try {
288
288
const args = parseArgs ( ) ;
289
289
await callMethod ( args ) ;
290
+ // Explicitly exit to ensure process terminates in CI
291
+ process . exit ( 0 ) ;
290
292
} catch ( error ) {
291
293
handleError ( error ) ;
292
294
}
You can’t perform that action at this time.
0 commit comments