Skip to content

Commit 6972af5

Browse files
committed
fix(release): skip unavailable Buzz QA runner
1 parent 27fa5a8 commit 6972af5

2 files changed

Lines changed: 62 additions & 9 deletions

File tree

‎.github/workflows/qa-live-transports-convex.yml‎

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,47 @@ jobs:
480480
node-version: ${{ env.NODE_VERSION }}
481481
install-bun: "true"
482482

483+
- name: Resolve Buzz QA runner
484+
id: resolve_buzz
485+
env:
486+
SELECTED_REVISION: ${{ needs.validate_selected_ref.outputs.selected_revision }}
487+
shell: bash
488+
run: |
489+
set -euo pipefail
490+
491+
output_dir=".artifacts/qa-e2e/buzz-live-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
492+
mkdir -p "${output_dir}"
493+
echo "output_dir=${output_dir}" >> "$GITHUB_OUTPUT"
494+
495+
OUTPUT_DIR="${output_dir}" node --input-type=module <<'NODE'
496+
import fs from "node:fs";
497+
498+
const manifestPath = "extensions/buzz/openclaw.plugin.json";
499+
const manifest = fs.existsSync(manifestPath)
500+
? JSON.parse(fs.readFileSync(manifestPath, "utf8"))
501+
: {};
502+
const available =
503+
Array.isArray(manifest.qaRunners) &&
504+
manifest.qaRunners.some((runner) => runner?.commandName === "buzz");
505+
fs.appendFileSync(process.env.GITHUB_OUTPUT, `available=${available}\n`);
506+
if (!available) {
507+
fs.writeFileSync(
508+
`${process.env.OUTPUT_DIR}/skipped.json`,
509+
`${JSON.stringify(
510+
{
511+
status: "skipped",
512+
reason: "selected ref does not declare the Buzz QA runner",
513+
revision: process.env.SELECTED_REVISION,
514+
},
515+
null,
516+
2,
517+
)}\n`,
518+
);
519+
}
520+
NODE
521+
483522
- name: Validate required Buzz QA credential env
523+
if: steps.resolve_buzz.outputs.available == 'true'
484524
env:
485525
OPENCLAW_QA_CONVEX_SITE_URL: ${{ secrets.OPENCLAW_QA_CONVEX_SITE_URL }}
486526
OPENCLAW_QA_CONVEX_SECRET_CI: ${{ secrets.OPENCLAW_QA_CONVEX_SECRET_CI }}
@@ -496,11 +536,13 @@ jobs:
496536
done
497537
498538
- name: Build private QA runtime
539+
if: steps.resolve_buzz.outputs.available == 'true'
499540
env:
500541
NODE_OPTIONS: --max-old-space-size=12288
501542
run: pnpm build
502543

503544
- name: Run Buzz live lane
545+
if: steps.resolve_buzz.outputs.available == 'true'
504546
id: run_lane
505547
shell: bash
506548
env:
@@ -513,7 +555,7 @@ jobs:
513555
run: |
514556
set -euo pipefail
515557
516-
output_dir=".artifacts/qa-e2e/buzz-live-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
558+
output_dir="${{ steps.resolve_buzz.outputs.output_dir }}"
517559
scenario_args=()
518560
519561
if [[ -n "${INPUT_SCENARIO// }" ]]; then
@@ -541,7 +583,7 @@ jobs:
541583
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
542584
with:
543585
name: ${{ inputs.expected_sha != '' && format('release-qa-live-buzz-{0}-{1}', inputs.expected_sha, github.run_attempt) || format('qa-live-buzz-{0}-{1}', github.run_id, github.run_attempt) }}
544-
path: ${{ steps.run_lane.outputs.output_dir }}
586+
path: ${{ steps.resolve_buzz.outputs.output_dir }}
545587
retention-days: 14
546588
if-no-files-found: error
547589

‎test/scripts/package-acceptance-workflow.test.ts‎

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2667,15 +2667,26 @@ describe("package artifact reuse", () => {
26672667
expected_sha: "${{ needs.resolve_target.outputs.revision }}",
26682668
run_buzz: true,
26692669
});
2670-
expect(workflowJob(QA_LIVE_TRANSPORTS_WORKFLOW, "run_live_buzz").if).toBe("inputs.run_buzz");
2671-
expect(
2672-
workflowStep(
2673-
workflowJob(QA_LIVE_TRANSPORTS_WORKFLOW, "run_live_buzz"),
2674-
"Upload Buzz QA artifacts",
2675-
).with?.name,
2676-
).toBe(
2670+
const buzzJob = workflowJob(QA_LIVE_TRANSPORTS_WORKFLOW, "run_live_buzz");
2671+
expect(buzzJob.if).toBe("inputs.run_buzz");
2672+
const resolveBuzz = workflowStep(buzzJob, "Resolve Buzz QA runner");
2673+
expect(resolveBuzz.run).toContain('runner?.commandName === "buzz"');
2674+
expect(resolveBuzz.run).toContain("selected ref does not declare the Buzz QA runner");
2675+
expect(workflowStep(buzzJob, "Validate required Buzz QA credential env").if).toBe(
2676+
"steps.resolve_buzz.outputs.available == 'true'",
2677+
);
2678+
expect(workflowStep(buzzJob, "Build private QA runtime").if).toBe(
2679+
"steps.resolve_buzz.outputs.available == 'true'",
2680+
);
2681+
expect(workflowStep(buzzJob, "Run Buzz live lane").if).toBe(
2682+
"steps.resolve_buzz.outputs.available == 'true'",
2683+
);
2684+
expect(workflowStep(buzzJob, "Upload Buzz QA artifacts").with?.name).toBe(
26772685
"${{ inputs.expected_sha != '' && format('release-qa-live-buzz-{0}-{1}', inputs.expected_sha, github.run_attempt) || format('qa-live-buzz-{0}-{1}', github.run_id, github.run_attempt) }}",
26782686
);
2687+
expect(workflowStep(buzzJob, "Upload Buzz QA artifacts").with?.path).toBe(
2688+
"${{ steps.resolve_buzz.outputs.output_dir }}",
2689+
);
26792690
});
26802691

26812692
it("runs live transport lanes nightly while release checks stay gated", () => {

0 commit comments

Comments
 (0)