mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-25 05:03:04 +00:00
ci(release): stabilize beta validation assertions
This commit is contained in:
@@ -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 });
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user