mirror of
https://github.com/gastownhall/beads.git
synced 2026-09-14 20:17:24 +08:00
9e8d411f71
* ci: add PR wrapper command surface * ci: collect wrapper timing in PR checks * docs: record initial CI wrapper measurements * ci: add manual measurement workflow * ci: allow branch measurement dispatch * ci: keep measuring independent commands after failures * docs: record branch-dispatched CI measurement * ci: keep measuring package suites after failures * docs: record CI measurement batch * fix: repair CI-measured test failures * test: make local Go gates hermetic * ci: add sharded integration measurement lane * test: fix internal beads integration TestMain * docs: record fixed integration shard measurement * ci: add hybrid integration sharding measurement * ci: speed up cmd/bd test shard discovery * ci: add 16-way integration sharding measurement * ci: measure prebuilt cmd bd sharding * docs: record prebuilt sharding measurement * docs: design CI build artifact stage * docs: record repeat prebuilt integration measurement * ci: add build artifact stage * ci: reuse build artifact in linux test lane * ci: promote main linux integration shards * ci: gate legacy platform tests to main * ci: satisfy workflow shell lint * ci: ignore archived migrations in duplicate check * ci: add package gate wrappers * test: clean up testing short boundaries * ci: allow unreleased version docs lag * ci: gate releases on package checks * ci: split workflow by tier * ci: add aggregate PR gates
57 lines
1.2 KiB
Bash
Executable File
57 lines
1.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Evaluate an aggregate GitHub Actions gate from needs.*.result values.
|
|
|
|
set -euo pipefail
|
|
|
|
gate_name="${CI_GATE_NAME:-CI Gate}"
|
|
required_vars="${CI_GATE_REQUIRED:-}"
|
|
skipped_ok_vars=" ${CI_GATE_SKIPPED_OK:-} "
|
|
failed=0
|
|
|
|
is_skipped_ok() {
|
|
local var="$1"
|
|
[[ "$skipped_ok_vars" == *" $var "* ]]
|
|
}
|
|
|
|
report_failure() {
|
|
local message="$1"
|
|
echo "::error::$message"
|
|
failed=1
|
|
}
|
|
|
|
if [[ -z "$required_vars" ]]; then
|
|
report_failure "CI_GATE_REQUIRED is empty for $gate_name"
|
|
fi
|
|
|
|
for var in $required_vars; do
|
|
result="${!var:-}"
|
|
case "$result" in
|
|
success)
|
|
echo "ok: $var=$result"
|
|
;;
|
|
skipped)
|
|
if is_skipped_ok "$var"; then
|
|
echo "ok: $var=$result (allowed)"
|
|
else
|
|
report_failure "$var was skipped"
|
|
fi
|
|
;;
|
|
failure|cancelled)
|
|
report_failure "$var=$result"
|
|
;;
|
|
"")
|
|
report_failure "$var is unset"
|
|
;;
|
|
*)
|
|
report_failure "$var has unexpected result: $result"
|
|
;;
|
|
esac
|
|
done
|
|
|
|
if [[ "$failed" -ne 0 ]]; then
|
|
echo "$gate_name failed"
|
|
exit 1
|
|
fi
|
|
|
|
echo "$gate_name passed"
|