Skip to content

Commit c48ca3f

Browse files
authored
[CI] Add ci gate job (vllm-project#11634)
Add ci-gate job to make sure all PR merged with ready label. - vLLM version: v0.23.0 - vLLM main: vllm-project/vllm@1f486d9 Signed-off-by: wangxiyuan <wangxiyuan1007@gmail.com>
1 parent 32b0860 commit c48ca3f

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

.github/workflows/pr_test.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,3 +215,42 @@ jobs:
215215
ref: ${{ github.event.pull_request.head.sha }}
216216
base_ref: ${{ github.base_ref }}
217217
test_groups: ${{ needs.lint-and-select-tests.outputs.test_groups }}
218+
219+
# Summary gate job — use this single, stable name as the required status check
220+
# in GitHub branch protection rules instead of tracking individual matrix job names.
221+
ci-gate:
222+
needs: [lint-and-select-tests, run-selected-tests]
223+
if: always()
224+
runs-on: linux-amd64-cpu-2-hk
225+
steps:
226+
- name: Check all required jobs
227+
run: |
228+
set -euo pipefail
229+
230+
LINT_RESULT="${{ needs.lint-and-select-tests.result }}"
231+
HAS_TESTS="${{ needs.lint-and-select-tests.outputs.has_tests }}"
232+
READY_LABELED="${{ contains(github.event.pull_request.labels.*.name, 'ready') }}"
233+
234+
echo "=== CI Gate Summary ==="
235+
echo "lint-and-select-tests: ${LINT_RESULT}"
236+
echo "has_tests: ${HAS_TESTS}"
237+
echo "ready label: ${READY_LABELED}"
238+
239+
if [ "${LINT_RESULT}" != "success" ] && [ "${LINT_RESULT}" != "skipped" ]; then
240+
echo "::error::lint-and-select-tests did not succeed (result: ${LINT_RESULT})"
241+
exit 1
242+
fi
243+
244+
# Only gate on tests when the PR actually runs them
245+
if [ "${HAS_TESTS}" = "true" ] && [ "${READY_LABELED}" = "true" ]; then
246+
TESTS_RESULT="${{ needs.run-selected-tests.result }}"
247+
echo "run-selected-tests (vllm matrix): ${TESTS_RESULT}"
248+
if [ "${TESTS_RESULT}" != "success" ]; then
249+
echo "::error::run-selected-tests did not succeed (result: ${TESTS_RESULT})"
250+
exit 1
251+
fi
252+
else
253+
echo "Skipped test gate (has_tests=${HAS_TESTS}, ready=${READY_LABELED})."
254+
fi
255+
256+
echo "=== CI Gate: PASSED ==="

0 commit comments

Comments
 (0)