diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4e50167..b3f6fec 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -9,6 +9,7 @@ on: branches: [main] pull_request: branches: [main] + merge_group: env: CARGO_NET_RETRY: 10 @@ -109,3 +110,21 @@ jobs: path: | fuzz/artifacts/ target/fuzz-logs/ + + # Sentinel job for required checks - configure this job name in repository settings. + # Accepts 'skipped' as success so that merge_group-only jobs don't block PRs. + required-checks: + if: always() + needs: [build-test, msrv, fuzz] + runs-on: ubuntu-latest + steps: + - name: Check all jobs + env: + NEEDS: ${{ toJson(needs) }} + run: | + FAILED=$(echo "$NEEDS" | jq -r 'to_entries[] | select(.value.result | IN("success","skipped") | not) | .key') + if [ -n "$FAILED" ]; then + echo "The following jobs did not succeed: $FAILED" + exit 1 + fi + echo "All jobs succeeded or were skipped."