chore(mcp): align ci script naming

This commit is contained in:
Guillaume ARM 2026-06-10 22:41:29 +02:00
parent b0cc1c75c8
commit fa86171d09
3 changed files with 8 additions and 7 deletions

View File

@ -134,7 +134,7 @@ npm-test-integration:
# Run Node-based tool CI. # Run Node-based tool CI.
npm-ci: npm-ci:
npm run ci --prefix tools/mcp-bridge npm run test:ci --prefix tools/mcp-bridge
# Build generated artifacts. # Build generated artifacts.
build: npm-build build: npm-build

View File

@ -20,8 +20,8 @@ Keep the Node package scripts simple and one-purpose:
- `npm run build` emits TypeScript into `dist/` and acts as the type-check gate. - `npm run build` emits TypeScript into `dist/` and acts as the type-check gate.
- `npm run test` runs the Node unit tests directly from TypeScript with `tsx --test test/*.test.ts`. No prior build is required. - `npm run test` runs the Node unit tests directly from TypeScript with `tsx --test test/*.test.ts`. No prior build is required.
- `npm run check` runs ESLint. TypeScript compilation is covered by `npm run build` and `npm run ci` to avoid duplicate compiler runs in repository CI. - `npm run check` runs ESLint. TypeScript compilation is covered by `npm run build` and `npm run test:ci` to avoid duplicate compiler runs in repository CI.
- `npm run ci` runs `npm run check && npm run build && npm run test`, so type errors and lint failures both surface even though `test` itself no longer compiles. - `npm run test:ci` runs `npm run check && npm run build && npm run test`, so type errors and lint failures both surface even though `test` itself no longer compiles.
- `npm run test-integration` runs the bridge-to-CraftOS integration suite with `tsx --test --test-concurrency=1 test-integration/*.test.ts`. Each case boots the bridge in-process on fixed loopback ports (`127.0.0.1:2000` for MCP HTTP, `127.0.0.1:2001` for the CraftOS link), spawns a CraftOS-PC headless computer that connects back, exercises `tools/call probe-computers`, and tears everything down. `--test-concurrency=1` keeps the fixed ports collision-free. - `npm run test-integration` runs the bridge-to-CraftOS integration suite with `tsx --test --test-concurrency=1 test-integration/*.test.ts`. Each case boots the bridge in-process on fixed loopback ports (`127.0.0.1:2000` for MCP HTTP, `127.0.0.1:2001` for the CraftOS link), spawns a CraftOS-PC headless computer that connects back, exercises `tools/call probe-computers`, and tears everything down. `--test-concurrency=1` keeps the fixed ports collision-free.
Expose matching repository recipes for the Node lifecycle: Expose matching repository recipes for the Node lifecycle:
@ -29,14 +29,14 @@ Expose matching repository recipes for the Node lifecycle:
- `just build` delegates to `npm run build` for the bridge. - `just build` delegates to `npm run build` for the bridge.
- `just test` depends on `just build`, runs `npm run test`, then runs the existing CraftOS-PC test suite. - `just test` depends on `just build`, runs `npm run test`, then runs the existing CraftOS-PC test suite.
- `just check` includes `npm run check` alongside Lua and Markdown checks. - `just check` includes `npm run check` alongside Lua and Markdown checks.
- `just ci` uses `npm run ci`, then runs CraftOS-PC tests and the broader integration/harness target. - `just ci` uses `npm run test:ci`, then runs CraftOS-PC tests and the broader integration/harness target.
- `just test-integration` runs the placeholder Node integration target and the Lua timeout harness checks. - `just test-integration` runs the placeholder Node integration target and the Lua timeout harness checks.
## Consequences ## Consequences
- `npm run test` no longer needs `dist/`. Both unit and integration tests load TypeScript directly through `tsx`, so test iteration is faster and `dist/` is only required for `npm start`. - `npm run test` no longer needs `dist/`. Both unit and integration tests load TypeScript directly through `tsx`, so test iteration is faster and `dist/` is only required for `npm start`.
- TypeScript errors are no longer caught by `npm run test`; they are caught by `npm run build`, which stays wired into `npm run ci`, `just build`, `just test`, and `just ci`. - TypeScript errors are no longer caught by `npm run test`; they are caught by `npm run build`, which stays wired into `npm run test:ci`, `just build`, `just test`, and `just ci`.
- `just ci` avoids duplicating Node unit tests by calling `npm run ci` directly and then invoking only the CraftOS-side test body. - `just ci` avoids duplicating Node unit tests by calling `npm run test:ci` directly and then invoking only the CraftOS-side test body.
- ESLint failures are part of `just check`, so they are covered by the same pre-commit and pre-push hooks as Lua and Markdown checks. - ESLint failures are part of `just check`, so they are covered by the same pre-commit and pre-push hooks as Lua and Markdown checks.
- Integration tests live in `tools/mcp-bridge/test-integration/`, with Lua client fixtures under `test-integration/lua/`. Slow end-to-end behavior stays out of the fast unit-test path. - Integration tests live in `tools/mcp-bridge/test-integration/`, with Lua client fixtures under `test-integration/lua/`. Slow end-to-end behavior stays out of the fast unit-test path.

View File

@ -6,7 +6,8 @@
"scripts": { "scripts": {
"build": "tsc --noEmit false", "build": "tsc --noEmit false",
"check": "eslint .", "check": "eslint .",
"ci": "npm run check && npm run build && npm run test", "test:all": "npm run check && npm run build && npm run test",
"test:ci": "npm run test:all && npm run test-integration",
"dev": "tsx src/index.ts", "dev": "tsx src/index.ts",
"start": "node dist/src/index.js", "start": "node dist/src/index.js",
"test": "tsx --test test/*.test.ts", "test": "tsx --test test/*.test.ts",