peppa/packages/testkit/test/ci-runner-config.test.ts
Асель f05a5ee498 PEP-157: OpenSpec change, тест на capacity раннера проверок, AGENTS.md
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-16 13:15:21 +05:00

15 lines
834 B
TypeScript

// PEP-157: with capacity 2 the queue of checks grew to hours at 13 open PRs; the host has 24 cores.
import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
import { describe, test } from "node:test";
const config = readFileSync(new URL("../../../infra/act-runner/config.yaml", import.meta.url), "utf8");
describe("PEP-157: очередь проверок — четыре одновременно", () => {
test("Значение вернули к двум: runner.capacity в конфиге раннера не меньше 4", () => {
const runner = config.slice(config.indexOf("\nrunner:"));
const capacity = Number(/^ {2}capacity:\s*(\d+)\s*$/m.exec(runner)?.[1]);
assert.ok(capacity >= 4, `runner.capacity must be at least 4 in infra/act-runner/config.yaml, got ${capacity}`);
});
});