fix: 调试发布run
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { projectRuntimeTrackedJob, runtimeBuildStages } from "./RuntimeTaskProgress";
|
||||
import { projectRuntimeTrackedJob, runtimeBuildStages, runtimeRunBuildStages } from "./RuntimeTaskProgress";
|
||||
|
||||
describe("distribution build job progress", () => {
|
||||
it("projects worker progress messages onto the real build stage", () => {
|
||||
@@ -51,4 +51,16 @@ describe("distribution build job progress", () => {
|
||||
expect(projection.status).toBe("running");
|
||||
expect(projection.message).toContain("第 2 次尝试");
|
||||
});
|
||||
|
||||
it("projects run generation onto the compact four-step run build flow", () => {
|
||||
const projection = projectRuntimeTrackedJob(runtimeRunBuildStages, {
|
||||
id: "job-run-build",
|
||||
state: "running",
|
||||
progress: { percent: 72, message: "build_compile: compiling run target" }
|
||||
});
|
||||
|
||||
expect(runtimeRunBuildStages.map((stage) => stage.label)).toEqual(["拉取 run 更新", "检测构建环境", "构建中", "构建完成"]);
|
||||
expect(projection).toMatchObject({ status: "running", currentStageKey: "build_compile" });
|
||||
expect(projection.stageStatus).toMatchObject({ git_sync: "completed", env_check: "completed", build_compile: "running", package_finalize: "pending" });
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user