perf: split infra, tooling, and provider test lanes

This commit is contained in:
Peter Steinberger
2026-04-04 04:36:47 +01:00
parent f62db7950a
commit 32ba917079
16 changed files with 348 additions and 42 deletions

View File

@@ -92,7 +92,7 @@ describe("test-projects args", () => {
it("routes top-level repo tests to the contracts config", () => {
expect(buildVitestRunPlans(["test/appcast.test.ts"])).toEqual([
{
config: "vitest.contracts.config.ts",
config: "vitest.tooling.config.ts",
forwardedArgs: [],
includePatterns: ["test/appcast.test.ts"],
watchMode: false,
@@ -100,6 +100,17 @@ describe("test-projects args", () => {
]);
});
it("routes script tests to the tooling config", () => {
expect(buildVitestRunPlans(["src/scripts/test-projects.test.ts"])).toEqual([
{
config: "vitest.tooling.config.ts",
forwardedArgs: [],
includePatterns: ["src/scripts/test-projects.test.ts"],
watchMode: false,
},
]);
});
it("routes contract tests to the contracts config", () => {
expect(
buildVitestRunPlans(["src/plugins/contracts/memory-embedding-provider.contract.test.ts"]),
@@ -116,7 +127,7 @@ describe("test-projects args", () => {
it("routes config baseline integration tests to the contracts config", () => {
expect(buildVitestRunPlans(["src/config/doc-baseline.integration.test.ts"])).toEqual([
{
config: "vitest.contracts.config.ts",
config: "vitest.tooling.config.ts",
forwardedArgs: [],
includePatterns: ["src/config/doc-baseline.integration.test.ts"],
watchMode: false,
@@ -168,6 +179,26 @@ describe("test-projects args", () => {
]);
});
it("routes infra targets to the infra config", () => {
expect(buildVitestRunPlans(["src/infra/openclaw-root.test.ts"])).toEqual([
{
config: "vitest.boundary.config.ts",
forwardedArgs: [],
includePatterns: ["src/infra/openclaw-root.test.ts"],
watchMode: false,
},
]);
expect(buildVitestRunPlans(["src/infra/migrations.test.ts"])).toEqual([
{
config: "vitest.infra.config.ts",
forwardedArgs: [],
includePatterns: ["src/infra/migrations.test.ts"],
watchMode: false,
},
]);
});
it("routes acp targets to the acp config", () => {
expect(buildVitestRunPlans(["src/acp/control-plane/manager.test.ts"])).toEqual([
{
@@ -217,7 +248,7 @@ describe("test-projects args", () => {
it("widens top-level test helpers to sibling repo tests under contracts", () => {
expect(buildVitestRunPlans(["test/helpers/temp-home.ts"])).toEqual([
{
config: "vitest.contracts.config.ts",
config: "vitest.tooling.config.ts",
forwardedArgs: [],
includePatterns: ["test/helpers/**/*.test.ts"],
watchMode: false,
@@ -271,7 +302,18 @@ describe("test-projects args", () => {
]);
});
it("routes direct provider extension file targets to the extensions config", () => {
it("routes direct provider extension file targets to the extension providers config", () => {
expect(buildVitestRunPlans(["extensions/openai/openai-codex-provider.test.ts"])).toEqual([
{
config: "vitest.extension-providers.config.ts",
forwardedArgs: [],
includePatterns: ["extensions/openai/openai-codex-provider.test.ts"],
watchMode: false,
},
]);
});
it("keeps non-provider extension file targets on the shared extensions config", () => {
expect(buildVitestRunPlans(["extensions/firecrawl/index.test.ts"])).toEqual([
{
config: "vitest.extensions.config.ts",