fix: use local smoke test in publish

This commit is contained in:
Josh Lambert
2026-04-16 10:45:29 -04:00
parent d404bb201f
commit 448cf2683f
2 changed files with 11 additions and 71 deletions
+4 -70
View File
@@ -262,76 +262,10 @@ jobs:
- version
- build-cli
if: github.repository == 'Kilo-Org/kilocode'
runs-on: ubuntu-24.04
steps:
- name: Trigger kilo-bench smoke test
id: trigger
env:
GH_TOKEN: ${{ secrets.BENCH_GITHUB_TOKEN }}
run: |
BEFORE=$(date -u -d '60 seconds ago' +%Y-%m-%dT%H:%M:%SZ)
gh api repos/Kilo-Org/kilo-bench/dispatches \
--method POST \
-f event_type=smoke-test \
-f 'client_payload[cli_version]=${{ needs.version.outputs.version }}' \
-f 'client_payload[release_tag]=${{ needs.version.outputs.tag }}' \
-f 'client_payload[release_id]=${{ needs.version.outputs.release }}' \
-f 'client_payload[pre_release]=${{ inputs.pre_release }}' \
-f 'client_payload[source_repo]=${{ github.repository }}' \
-f 'client_payload[source_run_id]=${{ github.run_id }}'
# Poll for the run created after our dispatch timestamp.
# The dispatch API returns no run ID, so we query by created time
# and pick the oldest match to avoid grabbing an unrelated run.
echo "Waiting for smoke-test run to appear (dispatched after $BEFORE)..."
for attempt in $(seq 1 30); do
RUN_ID=$(gh api \
"repos/Kilo-Org/kilo-bench/actions/workflows/smoke-test.yml/runs?event=repository_dispatch&created=>=$BEFORE" \
--jq '.workflow_runs | sort_by(.created_at) | .[0].id // empty')
if [[ -n "$RUN_ID" && "$RUN_ID" != "null" ]]; then
echo "run_id=$RUN_ID" >> "$GITHUB_OUTPUT"
echo "::notice::Smoke test run: https://github.com/Kilo-Org/kilo-bench/actions/runs/$RUN_ID"
exit 0
fi
echo " attempt $attempt: run not yet registered, retrying in 10s..."
sleep 10
done
echo "::error::Smoke test run did not appear within 5 minutes after dispatch."
exit 1
- name: Wait for smoke test to complete
env:
GH_TOKEN: ${{ secrets.BENCH_GITHUB_TOKEN }}
run: |
RUN_ID="${{ steps.trigger.outputs.run_id }}"
echo "Waiting for run $RUN_ID..."
for i in $(seq 1 60); do
CONCLUSION=$(gh run view "$RUN_ID" \
--repo Kilo-Org/kilo-bench \
--json conclusion \
--jq '.conclusion')
echo " attempt $i: $CONCLUSION"
if [[ "$CONCLUSION" == "success" ]]; then
echo "::notice::Smoke test passed."
exit 0
elif [[ "$CONCLUSION" != "null" && "$CONCLUSION" != "" ]]; then
echo "::error::Smoke test failed with conclusion: $CONCLUSION"
echo "See: https://github.com/Kilo-Org/kilo-bench/actions/runs/$RUN_ID"
exit 1
fi
sleep 30
done
echo "::error::Smoke test did not complete within 30 minutes."
exit 1
uses: ./.github/workflows/smoke-test.yml
with:
cli_version: ${{ needs.version.outputs.version }}
secrets: inherit
# kilocode_change end
publish:
needs:
+7 -1
View File
@@ -7,7 +7,7 @@
#
# Triggers:
# - workflow_dispatch: manually from Actions tab (optionally pass a CLI version)
# - push to main: automatically after every merge
# - workflow_call: from publish.yml after draft release assets are uploaded
#
# Required secrets:
# KILO_API_KEY — Kilo Gateway key
@@ -23,6 +23,12 @@ on:
description: "CLI version to test (e.g. 7.0.36). Leave blank for latest npm release."
required: false
type: string
workflow_call:
inputs:
cli_version:
description: "CLI version to test from draft release assets."
required: false
type: string
concurrency:
group: smoke-test