fix: 调试发布run

This commit is contained in:
npc0-hue
2026-07-22 11:44:48 +08:00
parent b06623d0ce
commit 6c3eb6e45f
41 changed files with 1289 additions and 206 deletions
@@ -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" });
});
});