diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 9be9e8a3..a11ffd92 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -301,3 +301,33 @@ jobs: - name: Setup and build wasm uses: ./.github/actions/setup_build_wasm + + gate: + name: PR Gate + runs-on: ubuntu-latest + timeout-minutes: 5 + # Branch-protection fan-in: one stable required context for this whole workflow. + # A matrix job skipped by its job-level `if:` reports a single check run under the + # *unexpanded* name (`Test for ${{ matrix.platform.target }}`) because the matrix is + # never evaluated -- so per-leg contexts never report and required checks hang on + # "Expected". This job always runs, so its name always reports. + if: always() + needs: [build_release, test, trunk_check_runner, build_pyo3, build_wasm] + steps: + - name: Check fan-in results + env: + RESULTS: ${{ join(needs.*.result, ' ') }} + shell: bash + run: | + read -ra results <<<"${RESULTS}" + for result in "${results[@]}"; do + case "${result}" in + # A skipped job is a pass: it was deliberately not run for this change. + success | skipped) ;; + *) + echo "::error::a needed job reported '${result}'" + exit 1 + ;; + esac + done + echo "needed jobs all passed or were skipped: ${RESULTS}" diff --git a/.github/workflows/pyo3.yml b/.github/workflows/pyo3.yml index 4eb7cd43..e6f34ba3 100644 --- a/.github/workflows/pyo3.yml +++ b/.github/workflows/pyo3.yml @@ -300,3 +300,35 @@ jobs: - name: Annotate workflow with S3 reference run: | echo "::notice title=Published bindings::context-py bindings published to S3 at ${{ needs.get-date-sha.outputs.reference }}" + + gate: + name: context-py Gate + runs-on: ubuntu-latest + timeout-minutes: 5 + # Branch-protection fan-in: one stable required context for this whole workflow. + # A matrix job skipped by its job-level `if:` reports a single check run under the + # *unexpanded* name (`Test for ${{ matrix.platform.target }}`) because the matrix is + # never evaluated -- so per-leg contexts never report and required checks hang on + # "Expected". This job always runs, so its name always reports. + # linux-pytest is omitted: it is not a required check today, and this job + # preserves that set rather than widening it. + if: always() + needs: [linux, macos, sdist] + steps: + - name: Check fan-in results + env: + RESULTS: ${{ join(needs.*.result, ' ') }} + shell: bash + run: | + read -ra results <<<"${RESULTS}" + for result in "${results[@]}"; do + case "${result}" in + # A skipped job is a pass: it was deliberately not run for this change. + success | skipped) ;; + *) + echo "::error::a needed job reported '${result}'" + exit 1 + ;; + esac + done + echo "needed jobs all passed or were skipped: ${RESULTS}" diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 66360420..05601e99 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -204,3 +204,34 @@ jobs: platform: x86_64-linux artifact-pattern: "" knapsack-pro-test-suite-token-rspec: ${{ secrets.KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC }} + + gate: + name: rspec Gate + runs-on: ubuntu-latest + timeout-minutes: 5 + # Branch-protection fan-in: one stable required context for this whole workflow. + # A matrix job skipped by its job-level `if:` reports a single check run under the + # *unexpanded* name (`Test for ${{ matrix.platform.target }}`) because the matrix is + # never evaluated -- so per-leg contexts never report and required checks hang on + # "Expected". This job always runs, so its name always reports. + # build-ruby-gem / test-ruby-gem-uploads are omitted: not required checks today. + if: always() + needs: [build] + steps: + - name: Check fan-in results + env: + RESULTS: ${{ join(needs.*.result, ' ') }} + shell: bash + run: | + read -ra results <<<"${RESULTS}" + for result in "${results[@]}"; do + case "${result}" in + # A skipped job is a pass: it was deliberately not run for this change. + success | skipped) ;; + *) + echo "::error::a needed job reported '${result}'" + exit 1 + ;; + esac + done + echo "needed jobs all passed or were skipped: ${RESULTS}" diff --git a/.github/workflows/wasm.yml b/.github/workflows/wasm.yml index 53dd62b0..258ce70a 100644 --- a/.github/workflows/wasm.yml +++ b/.github/workflows/wasm.yml @@ -64,3 +64,33 @@ jobs: if: "!cancelled() && github.event_name != 'pull_request'" run: | echo "::notice title=Published bindings::context-js bindings published to S3 at ${{ steps.get-date-sha.outputs.reference }}" + + gate: + name: context-js Gate + runs-on: ubuntu-latest + timeout-minutes: 5 + # Branch-protection fan-in: one stable required context for this whole workflow. + # A matrix job skipped by its job-level `if:` reports a single check run under the + # *unexpanded* name (`Test for ${{ matrix.platform.target }}`) because the matrix is + # never evaluated -- so per-leg contexts never report and required checks hang on + # "Expected". This job always runs, so its name always reports. + if: always() + needs: [build] + steps: + - name: Check fan-in results + env: + RESULTS: ${{ join(needs.*.result, ' ') }} + shell: bash + run: | + read -ra results <<<"${RESULTS}" + for result in "${results[@]}"; do + case "${result}" in + # A skipped job is a pass: it was deliberately not run for this change. + success | skipped) ;; + *) + echo "::error::a needed job reported '${result}'" + exit 1 + ;; + esac + done + echo "needed jobs all passed or were skipped: ${RESULTS}"