Skip to content

Commit ca9d2f3

Browse files
committed
ci: align vitest entrypoints with root config
1 parent 757a20b commit ca9d2f3

4 files changed

Lines changed: 10 additions & 9 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,6 @@ jobs:
545545
echo "OPENCLAW_VITEST_MAX_WORKERS=2" >> "$GITHUB_ENV"
546546
if [ "$TASK" = "channels" ]; then
547547
echo "OPENCLAW_VITEST_MAX_WORKERS=1" >> "$GITHUB_ENV"
548-
echo "OPENCLAW_TEST_ISOLATE=1" >> "$GITHUB_ENV"
549548
fi
550549
551550
- name: Download dist artifact

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,13 +1091,13 @@
10911091
"runtime-sidecars:gen": "node --import tsx scripts/generate-runtime-sidecar-paths-baseline.ts --write",
10921092
"stage:bundled-plugin-runtime-deps": "node scripts/stage-bundled-plugin-runtime-deps.mjs",
10931093
"start": "node scripts/run-node.mjs",
1094-
"test": "node scripts/test-projects.mjs",
1094+
"test": "vitest run --config vitest.config.ts",
10951095
"test:all": "pnpm lint && pnpm build && pnpm test && pnpm test:e2e && pnpm test:live && pnpm test:docker:all",
10961096
"test:auth:compat": "node scripts/run-vitest.mjs run --config vitest.gateway.config.ts src/gateway/server.auth.compat-baseline.test.ts src/gateway/client.test.ts src/gateway/reconnect-gating.test.ts src/gateway/protocol/connect-error-details.test.ts",
10971097
"test:build:singleton": "node scripts/test-built-plugin-singleton.mjs",
10981098
"test:bundled": "node scripts/run-vitest.mjs run --config vitest.bundled.config.ts",
1099-
"test:changed": "node scripts/run-vitest.mjs run --config vitest.config.ts --changed origin/main",
1100-
"test:changed:max": "OPENCLAW_VITEST_MAX_WORKERS=8 node scripts/run-vitest.mjs run --config vitest.config.ts --changed origin/main",
1099+
"test:changed": "vitest run --config vitest.config.ts --changed origin/main",
1100+
"test:changed:max": "OPENCLAW_VITEST_MAX_WORKERS=8 vitest run --config vitest.config.ts --changed origin/main",
11011101
"test:channels": "node scripts/run-vitest.mjs run --config vitest.channels.config.ts",
11021102
"test:contracts": "pnpm test:contracts:channels && pnpm test:contracts:plugins",
11031103
"test:contracts:channels": "node scripts/run-vitest.mjs run --config vitest.contracts.config.ts --maxWorkers=1 src/channels/plugins/contracts",
@@ -1126,7 +1126,7 @@
11261126
"test:extensions:memory": "node scripts/profile-extension-memory.mjs",
11271127
"test:fast": "node scripts/run-vitest.mjs run --config vitest.unit.config.ts",
11281128
"test:force": "node --import tsx scripts/test-force.ts",
1129-
"test:gateway": "node scripts/run-vitest.mjs run --config vitest.gateway.config.ts --pool=forks",
1129+
"test:gateway": "vitest run --config vitest.gateway.config.ts",
11301130
"test:gateway:watch-regression": "node scripts/check-gateway-watch-regression.mjs",
11311131
"test:install:e2e": "bash scripts/test-install-sh-e2e-docker.sh",
11321132
"test:install:e2e:anthropic": "OPENCLAW_E2E_MODELS=anthropic bash scripts/test-install-sh-e2e-docker.sh",
@@ -1135,7 +1135,7 @@
11351135
"test:live": "node scripts/test-live.mjs",
11361136
"test:live:gateway-profiles": "node scripts/test-live.mjs -- src/gateway/gateway-models.profiles.live.test.ts",
11371137
"test:live:models-profiles": "node scripts/test-live.mjs -- src/agents/models.profiles.live.test.ts",
1138-
"test:max": "OPENCLAW_VITEST_MAX_WORKERS=8 node scripts/test-projects.mjs",
1138+
"test:max": "OPENCLAW_VITEST_MAX_WORKERS=8 vitest run --config vitest.config.ts",
11391139
"test:parallels:linux": "bash scripts/e2e/parallels-linux-smoke.sh",
11401140
"test:parallels:macos": "bash scripts/e2e/parallels-macos-smoke.sh",
11411141
"test:parallels:npm-update": "bash scripts/e2e/parallels-npm-update-smoke.sh",
@@ -1147,7 +1147,7 @@
11471147
"test:perf:profile:main": "node scripts/run-vitest-profile.mjs main",
11481148
"test:perf:profile:runner": "node scripts/run-vitest-profile.mjs runner",
11491149
"test:sectriage": "node scripts/run-vitest.mjs run --config vitest.gateway.config.ts && node scripts/run-vitest.mjs run --config vitest.unit.config.ts --exclude src/daemon/launchd.integration.test.ts --exclude src/process/exec.test.ts",
1150-
"test:serial": "OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/test-projects.mjs",
1150+
"test:serial": "OPENCLAW_VITEST_MAX_WORKERS=1 vitest run --config vitest.config.ts",
11511151
"test:startup:bench": "node --import tsx scripts/bench-cli-startup.ts",
11521152
"test:startup:bench:check": "node scripts/test-cli-startup-bench-budget.mjs",
11531153
"test:startup:bench:save": "node --import tsx scripts/bench-cli-startup.ts --preset all --runs 5 --warmup 1 --output .artifacts/cli-startup-bench-all.json",
@@ -1156,7 +1156,7 @@
11561156
"test:startup:memory": "node scripts/check-cli-startup-memory.mjs",
11571157
"test:ui": "pnpm lint:ui:no-raw-window-open && pnpm --dir ui test",
11581158
"test:voicecall:closedloop": "node scripts/test-voicecall-closedloop.mjs",
1159-
"test:watch": "node scripts/test-projects.mjs --watch",
1159+
"test:watch": "vitest --config vitest.config.ts",
11601160
"ts-topology": "node --import tsx scripts/ts-topology.ts",
11611161
"tsgo": "node scripts/run-tsgo.mjs",
11621162
"tui": "node scripts/run-node.mjs tui",

scripts/test-force.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function runTests() {
2828
const isolatedLock =
2929
process.env.OPENCLAW_GATEWAY_LOCK ??
3030
path.join(os.tmpdir(), `openclaw-gateway.lock.test.${Date.now()}`);
31-
const result = spawnSync("pnpm", ["exec", "vitest", "run"], {
31+
const result = spawnSync("pnpm", ["exec", "vitest", "run", "--config", "vitest.config.ts"], {
3232
stdio: "inherit",
3333
env: {
3434
...process.env,

scripts/test-voicecall-closedloop.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import { bundledPluginFile } from "./lib/bundled-plugin-paths.mjs";
55

66
const args = [
77
"run",
8+
"--config",
9+
"vitest.config.ts",
810
bundledPluginFile("voice-call", "src/manager.test.ts"),
911
bundledPluginFile("voice-call", "src/media-stream.test.ts"),
1012
"src/plugins/voice-call.plugin.test.ts",

0 commit comments

Comments
 (0)