mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-05 01:22:55 +00:00
fix(ci): bootstrap raw changed gates from clean checkouts
This commit is contained in:
@@ -1816,6 +1816,34 @@ describe.concurrent("scripts/crabbox-wrapper", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("bootstraps Git metadata for non-sparse changed gates on remote raw syncs", () => {
|
||||
const result = runWrapper(
|
||||
"provider: hetzner, aws, local-container, blacksmith-testbox, or cloudflare\n",
|
||||
["run", "--provider", "aws", "--", "corepack", "pnpm", "check:changed"],
|
||||
{
|
||||
gitResponses: {
|
||||
[GIT_STATUS_PORCELAIN_KEY]: { stdout: "" },
|
||||
[GIT_MERGE_BASE_MAIN_HEAD_KEY]: { stdout: "abc123\n" },
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
const output = parseFakeCrabboxOutput(result);
|
||||
const remoteCommand = normalizeShellLineEndings(output.args.at(-1) ?? "");
|
||||
expect(result.status).toBe(0);
|
||||
expect(result.stderr).toContain("syncing from temporary full checkout");
|
||||
expect(result.stderr).toContain("overlaying local HEAD as worktree changes from abc123");
|
||||
expect(output.cwd).toContain("openclaw-crabbox-sync-");
|
||||
expect(output.args).toContain("--shell");
|
||||
expect(remoteCommand).toContain("git init -q");
|
||||
expect(remoteCommand).toContain(
|
||||
"git fetch -q --depth=1 origin abc123:refs/remotes/origin/main",
|
||||
);
|
||||
expect(remoteCommand).toMatch(
|
||||
/&& env OPENCLAW_CHECK_CHANGED_REMOTE_CHILD=1 OPENCLAW_CHANGED_LANES_RAW_SYNC=1 CI=1 corepack pnpm check:changed$/u,
|
||||
);
|
||||
});
|
||||
|
||||
it("bootstraps Git metadata for env-prefixed sparse changed gates", () => {
|
||||
const result = runWrapper(
|
||||
"provider: hetzner, aws, local-container, blacksmith-testbox, or cloudflare\n",
|
||||
|
||||
Reference in New Issue
Block a user