Refresh HiveGrid Cloud reference snapshot

This commit is contained in:
david committed 2026-08-03 15:31:14 +02:00
1 parent 5e99e14772
commit 7f88026f79
5955 files changed
+1177325 -188362

No files matched your search

@@ -12,99 +12,108 @@ function readWorkflow(relativePath) {
}
describe("a11y workflow install cache", () => {
for (const workflow of [".github/workflows/a11y.yml", ".gitea/workflows/a11y.yml"]) {
it(`${workflow} uses the pnpm store cache before installing`, () => {
const source = readWorkflow(workflow);
const configureStoreIndex = source.indexOf("pnpm config set store-dir .pnpm-store");
const cacheIndex = source.indexOf("uses: actions/cache@v4");
const installIndex = source.indexOf("pnpm install --frozen-lockfile --prefer-offline");
it("the Gitea a11y workflow uses the pnpm store cache before installing", () => {
const workflow = ".gitea/workflows/a11y.yml";
const source = readWorkflow(workflow);
const configureStoreIndex = source.indexOf("pnpm config set store-dir .pnpm-store");
const cacheIndex = source.search(/uses: actions\/cache@[0-9a-f]{40}/);
const installIndex = source.indexOf("pnpm install --frozen-lockfile --prefer-offline");
assert.ok(configureStoreIndex > 0, `${workflow} must configure .pnpm-store`);
assert.ok(cacheIndex > configureStoreIndex, `${workflow} must cache .pnpm-store after configuring it`);
assert.ok(source.includes("path: .pnpm-store"), `${workflow} must cache the pnpm store path`);
assert.ok(source.includes("key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}"), `${workflow} must key cache by pnpm lockfile`);
assert.ok(installIndex > cacheIndex, `${workflow} must install with --prefer-offline after cache restore`);
});
}
it(".github/workflows/a11y.yml cancels superseded PR runs without path-filtering required checks", () => {
const source = readWorkflow(".github/workflows/a11y.yml");
assert.match(source, /^concurrency:\s*$/m, "GitHub a11y workflow must cancel superseded runs");
assert.ok(
source.includes("group: a11y-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}"),
"GitHub a11y workflow must scope concurrency by workflow and PR/ref",
);
assert.match(source, /^\s+cancel-in-progress:\s*true\s*$/m, "GitHub a11y workflow must cancel in-progress duplicates");
assert.doesNotMatch(source, /^\s+paths:\s*$/m, "GitHub required a11y checks must not be skipped by path filters");
assert.doesNotMatch(source, /^\s+paths-ignore:\s*$/m, "GitHub required a11y checks must not be skipped by path-ignore filters");
assert.ok(configureStoreIndex > 0, `${workflow} must configure .pnpm-store`);
assert.ok(cacheIndex > configureStoreIndex, `${workflow} must cache .pnpm-store after configuring it`);
assert.ok(source.includes("path: .pnpm-store"), `${workflow} must cache the pnpm store path`);
assert.ok(source.includes("key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}"), `${workflow} must key cache by pnpm lockfile`);
assert.ok(installIndex > cacheIndex, `${workflow} must install with --prefer-offline after cache restore`);
});
});
describe("e2e readiness workflows", () => {
for (const workflow of [".github/workflows/e2e-readiness.yml", ".gitea/workflows/e2e-readiness.yml"]) {
it(`${workflow} runs the browser readiness suite in fail-closed mode`, () => {
const source = readWorkflow(workflow);
it("the Gitea readiness workflow runs the browser readiness suite in fail-closed mode", () => {
const workflow = ".gitea/workflows/e2e-readiness.yml";
const source = readWorkflow(workflow);
assert.match(source, /^ workflow_dispatch:\s*$/m, `${workflow} must support manual operator dispatch`);
assert.match(source, /^ schedule:\s*$/m, `${workflow} must run on a schedule`);
assert.ok(source.includes("pnpm config set store-dir .pnpm-store"), `${workflow} must configure the pnpm store`);
assert.ok(source.includes("path: .cache/ms-playwright"), `${workflow} must cache Playwright browsers`);
assert.ok(source.includes("pnpm install --frozen-lockfile --prefer-offline"), `${workflow} must install deterministically`);
assert.ok(source.includes("pnpm exec playwright install --with-deps chromium webkit"), `${workflow} must install every browser used by E2E_BROWSER_MATRIX=1`);
assert.ok(source.includes("pnpm run verify:e2e-a11y"), `${workflow} must run the strict Playwright wrapper`);
assert.ok(source.includes("plugin_lifecycle_mutation:"), `${workflow} must expose the plugin lifecycle mutation manual dispatch opt-in`);
assert.ok(source.includes("plugin_settings_write:"), `${workflow} must expose the plugin settings write manual dispatch opt-in`);
assert.ok(source.includes("workflow_outbox_drain:"), `${workflow} must expose the workflow outbox-drain manual dispatch opt-in`);
assert.ok(source.includes("workflow_webhook_run:"), `${workflow} must expose the real workflow webhook manual dispatch opt-in`);
assert.ok(source.includes("workflow_webhook_target_url:"), `${workflow} must expose the real workflow webhook target URL input`);
assert.ok(source.includes("subscription_success:"), `${workflow} must expose the checkout success manual dispatch opt-in`);
assert.ok(source.includes("subscription_success_path:"), `${workflow} must expose the checkout success return path input`);
assert.ok(source.includes("Apply manual operator E2E opt-ins"), `${workflow} must apply manual operator opt-ins before running Playwright`);
assert.match(source, /^ workflow_dispatch:\s*$/m, `${workflow} must support manual operator dispatch`);
assert.match(source, /^ schedule:\s*$/m, `${workflow} must run on a schedule`);
assert.ok(source.includes("pnpm config set store-dir .pnpm-store"), `${workflow} must configure the pnpm store`);
assert.ok(source.includes("path: .cache/ms-playwright"), `${workflow} must cache Playwright browsers`);
assert.ok(source.includes("pnpm install --frozen-lockfile --prefer-offline"), `${workflow} must install deterministically`);
assert.ok(
source.includes("pnpm exec playwright install --with-deps chromium webkit"),
`${workflow} must install every browser used by E2E_BROWSER_MATRIX=1`
);
assert.ok(source.includes("pnpm run verify:e2e-a11y"), `${workflow} must run the strict Playwright wrapper`);
assert.ok(source.includes("customer_portal_invitation:"), `${workflow} must expose the disposable VA-P26a invitation opt-in`);
assert.ok(source.includes("plugin_lifecycle_mutation:"), `${workflow} must expose the plugin lifecycle mutation manual dispatch opt-in`);
assert.ok(source.includes("plugin_settings_write:"), `${workflow} must expose the plugin settings write manual dispatch opt-in`);
assert.ok(source.includes("workflow_outbox_drain:"), `${workflow} must expose the workflow outbox-drain manual dispatch opt-in`);
assert.ok(source.includes("workflow_webhook_run:"), `${workflow} must expose the real workflow webhook manual dispatch opt-in`);
assert.ok(source.includes("workflow_webhook_target_url:"), `${workflow} must expose the real workflow webhook target URL input`);
assert.ok(source.includes("subscription_success:"), `${workflow} must expose the checkout success manual dispatch opt-in`);
assert.ok(source.includes("subscription_success_path:"), `${workflow} must expose the checkout success return path input`);
assert.ok(source.includes("Apply manual operator E2E opt-ins"), `${workflow} must apply manual operator opt-ins before running Playwright`);
for (const requiredEnv of [
'REQUIRE_E2E_A11Y: "1"',
'REQUIRE_AUTH_E2E: "1"',
'REQUIRE_E2E_READINESS: "1"',
'E2E_A11Y_STRICT: "1"',
'E2E_BROWSER_MATRIX: "1"',
'E2E_ALLOW_WORKFLOW_RUN: "1"',
"E2E_TENANT_EMAIL: ${{ secrets.E2E_TENANT_EMAIL }}",
"E2E_TENANT_PASSWORD: ${{ secrets.E2E_TENANT_PASSWORD }}",
"E2E_PLUGIN_READONLY_EMAIL: ${{ secrets.E2E_PLUGIN_READONLY_EMAIL }}",
"E2E_PLUGIN_READONLY_PASSWORD: ${{ secrets.E2E_PLUGIN_READONLY_PASSWORD }}",
"E2E_TENANT_API_DOCS_PATH: /e2e-readiness/settings/api/docs",
"E2E_TENANT_API_LOGS_PATH: /e2e-readiness/settings/api/logs",
"E2E_PLUGIN_SETTINGS_PATH: /e2e-readiness/settings/plugins",
"E2E_WORKFLOW_ENGINE_PATH: /e2e-readiness/workflow-engine/workflows",
"E2E_WORKFLOW_RUN_API_PATH: /e2e-readiness/workflow-engine/workflows/wf_123/run/api",
"E2E_WORKFLOW_WEBHOOK_BUILDER_PATH: /e2e-readiness/workflow-engine/workflows/wf_webhook_123",
"E2E_WORKFLOW_WEBHOOK_RUN_MANUAL_PATH: /e2e-readiness/workflow-engine/workflows/wf_webhook_123/run/manual",
"PLUGIN_BINARY_BASE_PATH: /tmp/e2e-plugins",
]) {
assert.ok(source.includes(requiredEnv), `${workflow} missing ${requiredEnv}`);
}
for (const requiredEnv of [
'REQUIRE_E2E_A11Y: "1"',
'REQUIRE_AUTH_E2E: "1"',
'REQUIRE_E2E_READINESS: "1"',
'E2E_A11Y_STRICT: "1"',
'E2E_BROWSER_MATRIX: "1"',
'E2E_ALLOW_WORKFLOW_RUN: "1"',
"E2E_TENANT_EMAIL: ${{ secrets.E2E_TENANT_EMAIL }}",
"E2E_TENANT_PASSWORD: ${{ secrets.E2E_TENANT_PASSWORD }}",
"E2E_PLUGIN_READONLY_EMAIL: ${{ secrets.E2E_PLUGIN_READONLY_EMAIL }}",
"E2E_PLUGIN_READONLY_PASSWORD: ${{ secrets.E2E_PLUGIN_READONLY_PASSWORD }}",
"E2E_TENANT_API_LOGS_PATH: /e2e-readiness/settings/integrations/api/logs",
"E2E_PLUGIN_SETTINGS_PATH: /e2e-readiness/settings/integrations/plugins",
"E2E_WORKFLOW_ENGINE_PATH: /e2e-readiness/workflow-engine/workflows",
"E2E_WORKFLOW_RUN_API_PATH: /e2e-readiness/workflow-engine/workflows/wf_123/run/api",
"E2E_WORKFLOW_WEBHOOK_BUILDER_PATH: /e2e-readiness/workflow-engine/workflows/wf_webhook_123",
"E2E_WORKFLOW_WEBHOOK_RUN_MANUAL_PATH: /e2e-readiness/workflow-engine/workflows/wf_webhook_123/run/manual",
"PLUGIN_BINARY_BASE_PATH: /tmp/e2e-plugins",
]) {
assert.ok(source.includes(requiredEnv), `${workflow} missing ${requiredEnv}`);
}
for (const optInExport of [
"E2E_ALLOW_PLUGIN_LIFECYCLE_MUTATION=1",
"E2E_ALLOW_PLUGIN_SETTINGS_WRITE=1",
"E2E_REQUIRE_WORKFLOW_OUTBOX_DRAIN=1",
"E2E_ALLOW_WORKFLOW_WEBHOOK_RUN=1",
"E2E_WORKFLOW_WEBHOOK_TARGET_URL=%s",
"E2E_REQUIRE_SUBSCRIPTION_SUCCESS=1",
"E2E_TENANT_SUBSCRIPTION_SUCCESS_PATH=%s",
]) {
assert.ok(source.includes(optInExport), `${workflow} must export ${optInExport} for manual dispatch`);
}
for (const optInExport of [
"E2E_ALLOW_PLUGIN_LIFECYCLE_MUTATION=1",
"E2E_ALLOW_PLUGIN_SETTINGS_WRITE=1",
"E2E_REQUIRE_WORKFLOW_OUTBOX_DRAIN=1",
"E2E_ALLOW_WORKFLOW_WEBHOOK_RUN=1",
"E2E_WORKFLOW_WEBHOOK_TARGET_URL=%s",
"E2E_REQUIRE_SUBSCRIPTION_SUCCESS=1",
"E2E_TENANT_SUBSCRIPTION_SUCCESS_PATH=%s",
]) {
assert.ok(source.includes(optInExport), `${workflow} must export ${optInExport} for manual dispatch`);
}
for (const requiredKey of readinessWorkflowEnvKeys) {
assert.match(source, new RegExp(`^\\s+${requiredKey}:\\s+`, "m"), `${workflow} missing strict readiness env key ${requiredKey}`);
}
for (const requiredKey of readinessWorkflowEnvKeys) {
assert.match(source, new RegExp(`^\\s+${requiredKey}:\\s+`, "m"), `${workflow} missing strict readiness env key ${requiredKey}`);
}
assert.doesNotMatch(source, /SKIP_E2E_A11Y:\s*"?1"?/, `${workflow} must not silently skip the browser suite`);
assert.ok(source.includes("path: test-results/"), `${workflow} must upload Playwright traces`);
});
}
assert.doesNotMatch(source, /SKIP_E2E_A11Y:\s*"?1"?/, `${workflow} must not silently skip the browser suite`);
assert.ok(source.includes("path: test-results/"), `${workflow} must upload Playwright traces`);
const invitationStep = source.slice(
source.indexOf("- name: Run operator-gated VA-P26a invitation lifecycle"),
source.indexOf("- name: Upload Playwright traces")
);
assert.match(invitationStep, /github\.event_name == 'workflow_dispatch'/u, `${workflow} must never run the invitation proof on schedule`);
assert.match(invitationStep, /inputs\.customer_portal_invitation/u, `${workflow} must bind the explicit invitation dispatch opt-in`);
for (const contract of [
'E2E_ALLOW_CUSTOMER_PORTAL_P26A_INVITATION_MUTATION: "1"',
'REQUIRE_E2E_MUTATING_READINESS: "1"',
"E2E_PORTAL_INVITATION_ADMIN_EMAIL",
"E2E_PORTAL_INVITATION_ADMIN_PASSWORD",
"E2E_PORTAL_INVITATION_SETUP_PASSWORD",
"E2E_PORTAL_SETUP_MAIL_FIXTURE_URL",
"E2E_PORTAL_SETUP_MAIL_FIXTURE_TOKEN",
"customer-portal-invitation+${correlation_key}@saas-ctrl.com",
"pnpm run verify:e2e-customer-portal-invitation",
]) {
assert.ok(invitationStep.includes(contract), `${workflow} invitation step missing ${contract}`);
}
assert.doesNotMatch(invitationStep, /GITHUB_ENV/u, `${workflow} must keep invitation secrets and recipient scoped to one shell step`);
});
it("the Gitea readiness workflow uses the self-hosted runner and host resolver", () => {
const source = readWorkflow(".gitea/workflows/e2e-readiness.yml");