Update hivegrid-cloud reference to latest main
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e98d38e716
commit
7b21524c86
3781 files changed
+373484
-225607
No files matched your search
@@ -7,22 +7,22 @@ import path from "node:path";
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
const repoRoot = path.resolve(__dirname, "..");
|
||||
const pnpmCommand = process.platform === "win32" ? "pnpm.cmd" : "pnpm";
|
||||
|
||||
export const s02OnboardingTestFiles = [
|
||||
"apps/web/app/modules/onboarding/services/OnboardingService.single-user-tenant-flow.test.ts",
|
||||
"apps/web/app/modules/onboarding/services/OnboardingSessionService.tenant-events.test.ts",
|
||||
"apps/web/app/modules/onboarding/routes/api/sessions/OnboardingSessionsIndexApi.tenant-filter.test.ts",
|
||||
];
|
||||
|
||||
export const gates = [
|
||||
{ id: "vitest-tenantAuth-s02-onboarding-flow", command: "pnpm", args: ["exec", "vitest", "run", ...s02OnboardingTestFiles] },
|
||||
{ id: "tenantAuth-baseline-gates", command: "pnpm", args: ["run", "verify:tenant-auth-baseline"] },
|
||||
{ id: "vitest-tenantAuth-s02-onboarding-flow", command: pnpmCommand, displayCommand: "pnpm", args: ["exec", "vitest", "run", ...s02OnboardingTestFiles] },
|
||||
{ id: "tenantAuth-baseline-gates", command: pnpmCommand, displayCommand: "pnpm", args: ["run", "verify:tenant-auth-baseline"] },
|
||||
];
|
||||
|
||||
const forbiddenCommandPattern = /\b(?:playwright|cypress|browser|e2e|watch)\b/i;
|
||||
|
||||
export function shellCommand(gate) {
|
||||
return [gate.command, ...gate.args].join(" ");
|
||||
return [gate.displayCommand ?? gate.command, ...gate.args].join(" ");
|
||||
}
|
||||
|
||||
export function validateGateConfig(candidateGates = gates) {
|
||||
@@ -36,11 +36,11 @@ export function validateGateConfig(candidateGates = gates) {
|
||||
const testFiles = vitestGate.args.filter((arg) => arg.endsWith(".test.ts") || arg.endsWith(".test.tsx") || arg.endsWith(".test.mjs"));
|
||||
const missingFiles = s02OnboardingTestFiles.filter((file) => !testFiles.includes(file));
|
||||
const extraFiles = testFiles.filter((file) => !s02OnboardingTestFiles.includes(file));
|
||||
if (vitestGate.command !== "pnpm" || vitestGate.args.slice(0, 3).join(" ") !== "exec vitest run") errors.push("S02 Vitest gate must use pnpm exec vitest run");
|
||||
if ((vitestGate.displayCommand ?? vitestGate.command) !== "pnpm" || vitestGate.args.slice(0, 3).join(" ") !== "exec vitest run") errors.push("S02 Vitest gate must use pnpm exec vitest run");
|
||||
if (missingFiles.length > 0) errors.push(`missing test files: ${missingFiles.join(", ")}`);
|
||||
if (extraFiles.length > 0) errors.push(`unexpected test files: ${extraFiles.join(", ")}`);
|
||||
}
|
||||
if (baselineGate && (baselineGate.command !== "pnpm" || baselineGate.args.join(" ") !== "run verify:tenant-auth-baseline")) errors.push("baseline gate must run pnpm run verify:tenant-auth-baseline");
|
||||
if (baselineGate && ((baselineGate.displayCommand ?? baselineGate.command) !== "pnpm" || baselineGate.args.join(" ") !== "run verify:tenant-auth-baseline")) errors.push("baseline gate must run pnpm run verify:tenant-auth-baseline");
|
||||
|
||||
for (const gate of candidateGates) {
|
||||
if (forbiddenCommandPattern.test(shellCommand(gate))) errors.push(`forbidden E2E/watch command reference in ${gate.id}`);
|
||||
@@ -57,7 +57,7 @@ function outputFingerprint(output) {
|
||||
function runGate(gate) {
|
||||
return new Promise((resolve) => {
|
||||
const startedAt = Date.now();
|
||||
const child = spawn(gate.command, gate.args, { cwd: repoRoot, env: { ...process.env, CI: "1" }, shell: false });
|
||||
const child = spawn(gate.command, gate.args, { cwd: repoRoot, env: { ...process.env, CI: "1" }, shell: process.platform === "win32" });
|
||||
let stdout = "";
|
||||
let stderr = "";
|
||||
child.stdout.on("data", (chunk) => { stdout += chunk; });
|
||||
|
||||
Reference in new issue
Block a user