15 lines
834 B
TypeScript
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}`);
|
|
});
|
|
});
|