fix(ci): resolve performance target refs before checkout · openclaw/openclaw@d4c1518
vincentkoc
·
2026-06-24
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -7,6 +7,7 @@ const WORKFLOW = ".github/workflows/openclaw-performance.yml";
|
7 | 7 | |
8 | 8 | type WorkflowStep = { |
9 | 9 | name?: string; |
| 10 | +id?: string; |
10 | 11 | if?: string; |
11 | 12 | run?: string; |
12 | 13 | env?: Record<string, string>; |
@@ -51,6 +52,22 @@ describe("OpenClaw performance workflow", () => {
|
51 | 52 | expect(workflow).toContain(`inputs.kova_ref || '${kovaRef}'`); |
52 | 53 | }); |
53 | 54 | |
| 55 | +it("resolves dispatch target refs before checkout", () => { |
| 56 | +const resolveTarget = findStep("Resolve OpenClaw target ref"); |
| 57 | +const checkout = findStep("Checkout OpenClaw"); |
| 58 | + |
| 59 | +expect(resolveTarget.id).toBe("target"); |
| 60 | +expect(resolveTarget.if).toBe("steps.lane.outputs.run == 'true'"); |
| 61 | +expect(resolveTarget.env?.GH_TOKEN).toBe("${{ github.token }}"); |
| 62 | +expect(resolveTarget.env?.TARGET_REF_INPUT).toBe("${{ inputs.target_ref }}"); |
| 63 | +expect(resolveTarget.run).toContain("encodeURIComponent"); |
| 64 | +expect(resolveTarget.run).toContain( |
| 65 | +'gh api "repos/${GITHUB_REPOSITORY}/commits/${encoded_ref}"', |
| 66 | +); |
| 67 | +expect(resolveTarget.run).toContain("checkout_ref=${resolved_sha}"); |
| 68 | +expect(checkout.with?.ref).toBe("${{ steps.target.outputs.checkout_ref }}"); |
| 69 | +}); |
| 70 | + |
54 | 71 | it("uses the clawgrit reports token for every report repo push path", () => { |
55 | 72 | const prepare = findStep("Prepare clawgrit reports checkout"); |
56 | 73 | const publish = findStep("Publish to clawgrit reports"); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。