Track HiveGrid Cloud planning reference

This commit is contained in:
david committed 2026-06-26 20:48:01 +02:00
1 parent b3d5ea6764
commit e341c5938a
5784 files changed
+1104929 -3

No files matched your search

@@ -0,0 +1,48 @@
import fs from "node:fs";
import { describe, expect, it } from "vitest";
const workflowPaths = [
".github/workflows/bundle-budget.yml",
".github/workflows/bundle-budget-baseline.yml",
".gitea/workflows/bundle-budget.yml",
];
describe("bundle budget workflows", () => {
it.each(workflowPaths)("runs the hard aggregate gate before writing JSON reports in %s", (workflowPath) => {
const workflow = fs.readFileSync(workflowPath, "utf8");
const hardGateIndex = workflow.indexOf("pnpm run verify:bundle-size");
const jsonReportIndex = workflow.indexOf("node scripts/verify-bundle-size.mjs --json");
expect(hardGateIndex).toBeGreaterThan(-1);
expect(jsonReportIndex).toBeGreaterThan(-1);
expect(hardGateIndex).toBeLessThan(jsonReportIndex);
});
it.each(workflowPaths)("runs when dependency graph inputs change in %s", (workflowPath) => {
const workflow = fs.readFileSync(workflowPath, "utf8");
expect(workflow).toContain('- "package.json"');
expect(workflow).toContain('- "pnpm-lock.yaml"');
});
it.each(workflowPaths)("keeps package triggers scoped to web bundle inputs in %s", (workflowPath) => {
const workflow = fs.readFileSync(workflowPath, "utf8");
expect(workflow).not.toContain('- "packages/**"');
for (const packagePath of [
"packages/brand/**",
"packages/config/**",
"packages/entitlements/**",
"packages/form-widget/**",
"packages/foundation/**",
"packages/i18n/**",
"packages/plugin-runtime/**",
"packages/ui*/**",
"packages/url/**",
"packages/view-models/**",
]) {
expect(workflow).toContain(`- "${packagePath}"`);
}
});
});