mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-14 00:43:28 +08:00
重构主控编排与运行时预热链路,统一工作区提示词/专家调度协议并补齐 wiki 记忆注入与写回闭环。
同时收敛启动与运维脚本默认行为(含 wiki worker)、更新 Admin 可观测性与相关测试,降低首轮时延并提高运行稳定性。 Made-with: Cursor
This commit is contained in:
parent
4a23b715a2
commit
dbbe3add6a
14438 changed files with 2693620 additions and 2546 deletions
50
openclaw/test/vitest/vitest.e2e.config.ts
Normal file
50
openclaw/test/vitest/vitest.e2e.config.ts
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
import os from "node:os";
|
||||
import { defineConfig } from "vitest/config";
|
||||
import { BUNDLED_PLUGIN_E2E_TEST_GLOB } from "./vitest.bundled-plugin-paths.ts";
|
||||
import baseConfig from "./vitest.config.ts";
|
||||
import { resolveRepoRootPath } from "./vitest.shared.config.ts";
|
||||
|
||||
const base = baseConfig as unknown as Record<string, unknown>;
|
||||
const isCI = process.env.CI === "true" || process.env.GITHUB_ACTIONS === "true";
|
||||
const cpuCount = os.cpus().length;
|
||||
// Keep e2e runs cheap by default; callers can still override via OPENCLAW_E2E_WORKERS.
|
||||
const defaultWorkers = isCI ? Math.min(2, Math.max(1, Math.floor(cpuCount * 0.25))) : 1;
|
||||
const requestedWorkers = Number.parseInt(process.env.OPENCLAW_E2E_WORKERS ?? "", 10);
|
||||
const e2eWorkers =
|
||||
Number.isFinite(requestedWorkers) && requestedWorkers > 0
|
||||
? Math.min(16, requestedWorkers)
|
||||
: defaultWorkers;
|
||||
const verboseE2E = process.env.OPENCLAW_E2E_VERBOSE === "1";
|
||||
|
||||
const baseTestWithProjects =
|
||||
(baseConfig as { test?: { exclude?: string[]; projects?: string[]; setupFiles?: string[] } })
|
||||
.test ?? {};
|
||||
const { projects: _projects, ...baseTest } = baseTestWithProjects as {
|
||||
exclude?: string[];
|
||||
projects?: string[];
|
||||
setupFiles?: string[];
|
||||
};
|
||||
const exclude = (baseTest.exclude ?? []).filter((p) => p !== "**/*.e2e.test.ts");
|
||||
|
||||
export default defineConfig({
|
||||
...base,
|
||||
test: {
|
||||
...baseTest,
|
||||
maxWorkers: e2eWorkers,
|
||||
silent: !verboseE2E,
|
||||
setupFiles: [
|
||||
...new Set(
|
||||
[...(baseTest.setupFiles ?? []), "test/setup-openclaw-runtime.ts"].map(resolveRepoRootPath),
|
||||
),
|
||||
],
|
||||
include: [
|
||||
"test/**/*.e2e.test.ts",
|
||||
"src/**/*.e2e.test.ts",
|
||||
"src/gateway/gateway.test.ts",
|
||||
"src/gateway/server.startup-matrix-migration.integration.test.ts",
|
||||
"src/gateway/sessions-history-http.test.ts",
|
||||
BUNDLED_PLUGIN_E2E_TEST_GLOB,
|
||||
],
|
||||
exclude,
|
||||
},
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue