ci(release): stabilize beta validation assertions

This commit is contained in:
Peter Steinberger
2026-05-19 00:28:44 +01:00
parent 59defa3e71
commit 1c3ff34d75
2 changed files with 11 additions and 2 deletions

View File

@@ -37,6 +37,10 @@ function expectZeroNpmJsonConfig(value: unknown): void {
expect(value === 0 || value === "0").toBe(true);
}
function expectUnsetOrZeroNpmJsonConfig(value: unknown): void {
expect(value == null || value === false || value === 0 || value === "0").toBe(true);
}
describe("npm project install env", () => {
it("uses an absolute POSIX script shell for npm lifecycle scripts", () => {
withMockedPlatform("linux", () => {
@@ -376,7 +380,7 @@ describe("npm project install env", () => {
npmConfig.before === false ||
typeof npmConfig.before === "string",
).toBe(true);
expectZeroNpmJsonConfig(npmConfig["min-release-age"]);
expectUnsetOrZeroNpmJsonConfig(npmConfig["min-release-age"]);
} finally {
fsSync.rmSync(dir, { recursive: true, force: true });
}

View File

@@ -98,10 +98,15 @@ describe("test-install-sh-docker", () => {
it("allows repository branch history and release tags for secret-backed Docker release checks", () => {
const workflow = readFileSync(LIVE_E2E_WORKFLOW_PATH, "utf8");
expect(workflow).toContain("git fetch --no-tags origin '+refs/heads/*:refs/remotes/origin/*'");
expect(workflow).toContain('git rev-parse --verify "${INPUT_REF}^{commit}"');
expect(workflow).toContain(
'git merge-base --is-ancestor "$selected_sha" refs/remotes/origin/main',
);
expect(workflow).toContain("repository-branch-history");
expect(workflow).toContain("git tag --points-at \"$selected_sha\" | grep -Eq '^v'");
expect(workflow).toContain(
"git for-each-ref --format='%(refname:short)' --contains \"$selected_sha\" refs/remotes/origin",
);
expect(workflow).toContain("reachable from an OpenClaw branch or release tag");
});