mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 18:40:44 +00:00
ci: keep gateway watch skip-build artifact fresh
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { isIgnoredDistRuntimeWatchPath } from "../../scripts/check-gateway-watch-regression.mjs";
|
||||
import {
|
||||
isIgnoredDistRuntimeWatchPath,
|
||||
shouldRefreshBuildStampForRestoredArtifacts,
|
||||
} from "../../scripts/check-gateway-watch-regression.mjs";
|
||||
|
||||
describe("check-gateway-watch-regression", () => {
|
||||
it("ignores top-level dist-runtime extension dependency repairs", () => {
|
||||
@@ -19,4 +22,25 @@ describe("check-gateway-watch-regression", () => {
|
||||
),
|
||||
).toBe(false);
|
||||
});
|
||||
|
||||
it("refreshes restored build stamps only for skip-build config mtime drift", () => {
|
||||
expect(
|
||||
shouldRefreshBuildStampForRestoredArtifacts({
|
||||
skipBuild: true,
|
||||
buildRequirement: { shouldBuild: true, reason: "config_newer" },
|
||||
}),
|
||||
).toBe(true);
|
||||
expect(
|
||||
shouldRefreshBuildStampForRestoredArtifacts({
|
||||
skipBuild: false,
|
||||
buildRequirement: { shouldBuild: true, reason: "config_newer" },
|
||||
}),
|
||||
).toBe(false);
|
||||
expect(
|
||||
shouldRefreshBuildStampForRestoredArtifacts({
|
||||
skipBuild: true,
|
||||
buildRequirement: { shouldBuild: true, reason: "source_mtime_newer" },
|
||||
}),
|
||||
).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user