Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/rust-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,3 +266,39 @@ jobs:
if (p + 0 < f + 0) { printf "FAIL: line coverage %.2f%% is below floor %s%%\n", p, f; exit 1 }
printf "OK: line coverage %.2f%% >= floor %s%%\n", p, f
}'

# One context for the Branch-Floor ruleset, which requires `CI/gate` (owner
# ruling 2026-11-17: keep that requirement and give it a producer). Until
# this job existed nothing emitted `CI/gate`, so every pull request stayed
# blocked with no failing check to say why. The job name is the context, so
# it carries no `rust-ci / ` prefix. It passes only when Cargo.toml was
# found and every Rust job above succeeded: a skipped, cancelled or missing
# job fails it, so the gate cannot go green on work that did not run.
gate:
timeout-minutes: 5
name: CI/gate
runs-on: ubuntu-latest
needs: [detect, check, test, audit, coverage]
if: always()
permissions: {}
steps:
- name: Check every Rust job succeeded
env:
NEEDS_JSON: ${{ toJSON(needs) }}
run: |
set -euo pipefail
has_cargo=$(jq -r '.detect.outputs.has_cargo // "missing"' <<< "$NEEDS_JSON")
if [ "$has_cargo" != true ]; then
echo "::error::Cargo.toml was not detected (has_cargo=$has_cargo); echidna is a Rust workspace, so this is a failure, not a skip"
exit 1
fi
failed=0
for job in detect check test audit coverage; do
result=$(jq -r --arg job "$job" '.[$job].result // "missing"' <<< "$NEEDS_JSON")
if [ "$result" != success ]; then
echo "::error::$job did not succeed (result: $result)"
failed=1
fi
done
[ "$failed" = 0 ] || exit 1
echo "CI/gate passed: detect, check, test, audit and coverage all succeeded."
Loading