





















@@ -21,8 +21,10 @@ type WorkflowJob = {
2121};
22222323type Workflow = {
24+concurrency?: unknown;
2425env?: Record<string, string>;
2526jobs?: Record<string, WorkflowJob>;
27+permissions?: Record<string, string>;
2628};
27292830type PackageJson = {
@@ -48,6 +50,16 @@ function workflowStep(name: string): WorkflowStep {
4850return step;
4951}
505253+function jobStep(workflowFile: string, jobName: string, stepName: string): WorkflowStep {
54+const workflow = parse(readFileSync(workflowFile, "utf8")) as Workflow;
55+const steps = workflow.jobs?.[jobName]?.steps ?? [];
56+const step = steps.find((candidate) => candidate.name === stepName);
57+if (!step) {
58+throw new Error(`Missing workflow step: ${workflowFile} ${jobName} ${stepName}`);
59+}
60+return step;
61+}
62+5163describe("Mantis Telegram Desktop proof workflow", () => {
5264it("runs with the repository pnpm major", () => {
5365const workflow = parse(readFileSync(WORKFLOW, "utf8")) as Workflow;
@@ -58,6 +70,27 @@ describe("Mantis Telegram Desktop proof workflow", () => {
5870expect(liveWorkflow.env?.PNPM_VERSION?.split(".", 1)[0]).toBe(pnpmMajor);
5971});
607273+it("serializes all Mantis Telegram account runs without workflow concurrency cancellation", () => {
74+const workflow = parse(readFileSync(WORKFLOW, "utf8")) as Workflow;
75+const liveWorkflow = parse(readFileSync(LIVE_WORKFLOW, "utf8")) as Workflow;
76+77+expect(workflow.concurrency).toBeUndefined();
78+expect(liveWorkflow.concurrency).toBeUndefined();
79+expect(workflow.permissions?.actions).toBe("read");
80+expect(liveWorkflow.permissions?.actions).toBe("read");
81+82+for (const step of [
83+jobStep(WORKFLOW, "run_telegram_desktop_proof", "Wait for older Mantis Telegram account run"),
84+jobStep(LIVE_WORKFLOW, "run_telegram_live", "Wait for older Mantis Telegram account run"),
85+]) {
86+expect(step.run).toContain("mantis-telegram-desktop-proof.yml");
87+expect(step.run).toContain("mantis-telegram-live.yml");
88+expect(step.run).toContain("GITHUB_RUN_ID");
89+expect(step.run).toContain(".createdAt < $current_created");
90+expect(step.run).toContain("sleep 60");
91+}
92+});
93+6194it("uses the OpenClaw Mantis mention as the comment trigger", () => {
6295const workflow = readFileSync(WORKFLOW, "utf8");
6396expect(workflow).toContain("@openclaw-mantis");
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。