mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-30 19:59:35 +00:00
fix(ci): resolve performance target refs before checkout
This commit is contained in:
@@ -7,6 +7,7 @@ const WORKFLOW = ".github/workflows/openclaw-performance.yml";
|
||||
|
||||
type WorkflowStep = {
|
||||
name?: string;
|
||||
id?: string;
|
||||
if?: string;
|
||||
run?: string;
|
||||
env?: Record<string, string>;
|
||||
@@ -51,6 +52,22 @@ describe("OpenClaw performance workflow", () => {
|
||||
expect(workflow).toContain(`inputs.kova_ref || '${kovaRef}'`);
|
||||
});
|
||||
|
||||
it("resolves dispatch target refs before checkout", () => {
|
||||
const resolveTarget = findStep("Resolve OpenClaw target ref");
|
||||
const checkout = findStep("Checkout OpenClaw");
|
||||
|
||||
expect(resolveTarget.id).toBe("target");
|
||||
expect(resolveTarget.if).toBe("steps.lane.outputs.run == 'true'");
|
||||
expect(resolveTarget.env?.GH_TOKEN).toBe("${{ github.token }}");
|
||||
expect(resolveTarget.env?.TARGET_REF_INPUT).toBe("${{ inputs.target_ref }}");
|
||||
expect(resolveTarget.run).toContain("encodeURIComponent");
|
||||
expect(resolveTarget.run).toContain(
|
||||
'gh api "repos/${GITHUB_REPOSITORY}/commits/${encoded_ref}"',
|
||||
);
|
||||
expect(resolveTarget.run).toContain("checkout_ref=${resolved_sha}");
|
||||
expect(checkout.with?.ref).toBe("${{ steps.target.outputs.checkout_ref }}");
|
||||
});
|
||||
|
||||
it("uses the clawgrit reports token for every report repo push path", () => {
|
||||
const prepare = findStep("Prepare clawgrit reports checkout");
|
||||
const publish = findStep("Publish to clawgrit reports");
|
||||
|
||||
Reference in New Issue
Block a user