mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 13:40:44 +00:00
ci: shard install smoke release checks
This commit is contained in:
58
.github/workflows/full-release-validation.yml
vendored
58
.github/workflows/full-release-validation.yml
vendored
@@ -610,20 +610,64 @@ jobs:
|
||||
return 1
|
||||
fi
|
||||
|
||||
local status conclusion url attempt
|
||||
status="$(gh run view "$run_id" --json status --jq '.status')"
|
||||
conclusion="$(gh run view "$run_id" --json conclusion --jq '.conclusion')"
|
||||
url="$(gh run view "$run_id" --json url --jq '.url')"
|
||||
attempt="$(gh run view "$run_id" --json attempt --jq '.attempt')"
|
||||
local run_json status conclusion url attempt
|
||||
run_json="$(gh run view "$run_id" --json status,conclusion,url,attempt,jobs)"
|
||||
status="$(jq -r '.status' <<< "$run_json")"
|
||||
conclusion="$(jq -r '.conclusion' <<< "$run_json")"
|
||||
url="$(jq -r '.url' <<< "$run_json")"
|
||||
attempt="$(jq -r '.attempt' <<< "$run_json")"
|
||||
echo "${label}: ${status}/${conclusion} attempt ${attempt}: ${url}"
|
||||
|
||||
if [[ "$status" != "completed" || "$conclusion" != "success" ]]; then
|
||||
echo "::error::${label} child run ended with ${status}/${conclusion}: ${url}"
|
||||
gh run view "$run_id" --json jobs --jq '.jobs[] | select(.conclusion != "success" and .conclusion != "skipped") | {name, status, conclusion, url}' || true
|
||||
jq '.jobs[] | select(.conclusion != "success" and .conclusion != "skipped") | {name, status, conclusion, url}' <<< "$run_json" || true
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
append_child_overview() {
|
||||
{
|
||||
echo
|
||||
echo "### Child workflow overview"
|
||||
echo
|
||||
echo "| Child | Result | Minutes | Run |"
|
||||
echo "| --- | --- | ---: | --- |"
|
||||
} >> "$GITHUB_STEP_SUMMARY"
|
||||
|
||||
append_child_row() {
|
||||
local label="$1"
|
||||
local run_id="$2"
|
||||
local result="$3"
|
||||
|
||||
if [[ -z "${run_id// }" ]]; then
|
||||
echo "| \`${label}\` | \`${result}\` | | skipped |" >> "$GITHUB_STEP_SUMMARY"
|
||||
return 0
|
||||
fi
|
||||
|
||||
local run_json row
|
||||
run_json="$(gh run view "$run_id" --json status,conclusion,url,createdAt,updatedAt)"
|
||||
row="$(
|
||||
jq -r --arg label "$label" '
|
||||
def ts: fromdateiso8601;
|
||||
. as $run |
|
||||
($run.createdAt // "") as $created |
|
||||
($run.updatedAt // "") as $updated |
|
||||
(if ($created | length) > 0 and ($updated | length) > 0
|
||||
then (((($updated | ts) - ($created | ts)) / 60) * 10 | round / 10 | tostring)
|
||||
else ""
|
||||
end) as $minutes |
|
||||
"| `" + $label + "` | `" + ($run.status // "") + "/" + ($run.conclusion // "") + "` | " + $minutes + " | [run](" + ($run.url // "") + ") |"
|
||||
' <<< "$run_json"
|
||||
)"
|
||||
echo "$row" >> "$GITHUB_STEP_SUMMARY"
|
||||
}
|
||||
|
||||
append_child_row "normal_ci" "$NORMAL_CI_RUN_ID" "$NORMAL_CI_RESULT"
|
||||
append_child_row "plugin_prerelease" "$PLUGIN_PRERELEASE_RUN_ID" "$PLUGIN_PRERELEASE_RESULT"
|
||||
append_child_row "release_checks" "$RELEASE_CHECKS_RUN_ID" "$RELEASE_CHECKS_RESULT"
|
||||
append_child_row "npm_telegram" "$NPM_TELEGRAM_RUN_ID" "$NPM_TELEGRAM_RESULT"
|
||||
}
|
||||
|
||||
summarize_child_timing() {
|
||||
local label="$1"
|
||||
local run_id="$2"
|
||||
@@ -675,6 +719,8 @@ jobs:
|
||||
|
||||
failed=0
|
||||
|
||||
append_child_overview
|
||||
|
||||
if [[ "$NORMAL_CI_RESULT" == "skipped" && -z "${NORMAL_CI_RUN_ID// }" ]]; then
|
||||
check_child "normal_ci" "" 0 || failed=1
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user