mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 20:20:42 +00:00
fix(ci): slim build-artifacts dist producer
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { BUILD_ALL_STEPS, resolveBuildAllStep } from "../../scripts/build-all.mjs";
|
||||
import {
|
||||
BUILD_ALL_PROFILES,
|
||||
BUILD_ALL_STEPS,
|
||||
resolveBuildAllStep,
|
||||
resolveBuildAllSteps,
|
||||
} from "../../scripts/build-all.mjs";
|
||||
|
||||
describe("resolveBuildAllStep", () => {
|
||||
it("routes pnpm steps through the npm_execpath pnpm runner on Windows", () => {
|
||||
@@ -70,3 +75,29 @@ describe("resolveBuildAllStep", () => {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("resolveBuildAllSteps", () => {
|
||||
it("keeps the full profile aligned with the declared steps", () => {
|
||||
expect(resolveBuildAllSteps("full")).toEqual(BUILD_ALL_STEPS);
|
||||
expect(BUILD_ALL_PROFILES.full).toEqual(BUILD_ALL_STEPS.map((step) => step.label));
|
||||
});
|
||||
|
||||
it("uses a runtime-only profile for ci artifacts", () => {
|
||||
expect(resolveBuildAllSteps("ciArtifacts").map((step) => step.label)).toEqual([
|
||||
"canvas:a2ui:bundle",
|
||||
"tsdown",
|
||||
"runtime-postbuild",
|
||||
"build-stamp",
|
||||
"canvas-a2ui-copy",
|
||||
"copy-hook-metadata",
|
||||
"copy-export-html-templates",
|
||||
"write-build-info",
|
||||
"write-cli-startup-metadata",
|
||||
"write-cli-compat",
|
||||
]);
|
||||
});
|
||||
|
||||
it("rejects unknown build profiles", () => {
|
||||
expect(() => resolveBuildAllSteps("wat")).toThrow("Unknown build profile: wat");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user