Watch
0
0
Fork
You've already forked hyperhive
0

the builds list keeps the swarm's deploy builds too

build_meta, the build of each agent from internal/meta before a deploy, now
writes its result into the same list as the config PR builds: the agent, the
internal/meta commit, how it ended and what nix printed. The builds card titles
them by agent and shows them with the PR builds.
This commit is contained in:
iris 2026-10-30 02:06:07 +01:00
commit b74011bb54

View file

@ -3,7 +3,11 @@
// stripping, so the `.ts` module is imported as it is.
import assert from "node:assert/strict";
import { test } from "node:test";
import { bodyText, wantedRun } from "../src/pages/builds/builds-types.ts";
import {
bodyText,
runTitle,
wantedRun,
} from "../src/pages/builds/builds-types.ts";
const base = {
id: "atlas-abc-1",
@ -49,3 +53,20 @@ test("a run with no text for its outcome shows no body", () => {
assert.equal(bodyText({ ...base, outcome: "failed" }), null);
assert.equal(bodyText({ ...base, outcome: "built", error_tail: "x" }), null);
});
test("a config PR's build is titled by its repo and PR, a deploy's by its agent", () => {
assert.equal(
runTitle({ ...base, outcome: "built" }),
"agent-configs/atlas #3",
);
const deploy = {
...base,
repo: "internal/meta",
pr: undefined,
agent: "atlas",
outcome: "built",
};
assert.equal(runTitle(deploy), "atlas from internal/meta");
assert.equal(runTitle({ ...deploy, pr: null }), "atlas from internal/meta");
assert.equal(runTitle({ ...deploy, agent: null }), "internal/meta");
});