mirror of
https://github.com/Heretek-AI/openclaw.git
synced 2026-07-01 01:37:55 -04:00
a9ae1a6778
Matrix Protocol: - docker-compose.matrix.yml: Dendrite homeserver + PostgreSQL + Nginx TLS - src/channels/plugins/matrix-channel.ts: OpenClaw plugin implementation - docs/matrix-triad-setup.md: Setup guide with auth scheme (@tm1-4:triad.local) MCP Server Integration: - docs/mcp-triad-integration.md: SearXNG, Playwright, GitHub MCP configs - docs/mcp-curiosity-mapping.md: Gap-to-capability mapping Node Sync Architecture: - src/services/node-sync-service.ts: WebSocket peer sync + presence detection - src/services/node-sync-service.test.ts: Unit tests - docs/node-sync-architecture.md: Architecture docs Triad Resilience: - scripts/triad-corruption-check.mjs: SQLite + log + config + git integrity - docs/triad-resilience.md: Recovery procedures - .secure/deployment-logs/README.md: Schema v2 - skills/triad-heartbeat/SKILL.md: Corruption check integration NPM Publish Workflow: - scripts/npm-publish.mjs: version, changelog, validate, publish, rollback - .github/workflows/npm-publish.yml: GitHub Actions with provenance - docs/npm-publish-guide.md: Complete documentation All deliverables tested in Docker before production.
32 lines
1.2 KiB
TypeScript
Executable File
32 lines
1.2 KiB
TypeScript
Executable File
import os from "node:os";
|
|
import { defineConfig } from "vitest/config";
|
|
import baseConfig from "./vitest.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 deterministic and 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 baseTest = (baseConfig as { test?: { exclude?: string[] } }).test ?? {};
|
|
const exclude = (baseTest.exclude ?? []).filter((p) => p !== "**/*.e2e.test.ts");
|
|
|
|
export default defineConfig({
|
|
...base,
|
|
test: {
|
|
...baseTest,
|
|
// Keep e2e in process forks for deterministic cross-file isolation.
|
|
pool: "forks",
|
|
maxWorkers: e2eWorkers,
|
|
silent: !verboseE2E,
|
|
include: ["test/**/*.e2e.test.ts", "src/**/*.e2e.test.ts", "extensions/**/*.e2e.test.ts"],
|
|
exclude,
|
|
},
|
|
});
|