Skip to content

Commit a9f6525

Browse files
committed
labeled CI
1 parent df8c84e commit a9f6525

1 file changed

Lines changed: 58 additions & 0 deletions

File tree

.github/workflows/pr_main.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,61 @@ jobs:
119119
spark-short: '3.5'
120120
spark-full: '3.5.8'
121121
java: 17
122+
123+
# Single required check for branch protection. GitHub treats skipped jobs
124+
# as success for required status checks, so requiring the individual jobs
125+
# above would allow unlabeled PRs to merge. This job runs unconditionally
126+
# and only passes when every orchestrated job actually ran and succeeded.
127+
# Configure branch protection to require ONLY `PR Main / all-checks`.
128+
all-checks:
129+
name: All Required Checks
130+
if: always()
131+
needs:
132+
- gate
133+
- build-linux
134+
- build-macos
135+
- benchmark-check
136+
- markdown-format
137+
- missing-suites
138+
- rat-check
139+
- title-check
140+
- spark-sql-3-5
141+
- spark-sql-4-0
142+
- iceberg-1-10
143+
runs-on: ubuntu-latest
144+
steps:
145+
- name: Aggregate results
146+
env:
147+
GATE_RUN: ${{ needs.gate.outputs.run }}
148+
GATE_RESULT: ${{ needs.gate.result }}
149+
RESULTS: |
150+
build-linux=${{ needs.build-linux.result }}
151+
build-macos=${{ needs.build-macos.result }}
152+
benchmark-check=${{ needs.benchmark-check.result }}
153+
markdown-format=${{ needs.markdown-format.result }}
154+
missing-suites=${{ needs.missing-suites.result }}
155+
rat-check=${{ needs.rat-check.result }}
156+
title-check=${{ needs.title-check.result }}
157+
spark-sql-3-5=${{ needs.spark-sql-3-5.result }}
158+
spark-sql-4-0=${{ needs.spark-sql-4-0.result }}
159+
iceberg-1-10=${{ needs.iceberg-1-10.result }}
160+
run: |
161+
printf '%s\n' "$RESULTS"
162+
echo
163+
if [[ "$GATE_RESULT" != "success" ]]; then
164+
echo "::error::Gate job did not succeed ($GATE_RESULT)."
165+
exit 1
166+
fi
167+
if [[ "$GATE_RUN" != "true" ]]; then
168+
echo "::error::PR is missing the 'CI Ready' label — required checks have not run. Add the label to enable merge."
169+
exit 1
170+
fi
171+
failed=0
172+
while IFS='=' read -r name result; do
173+
[[ -z "$name" ]] && continue
174+
if [[ "$result" != "success" ]]; then
175+
echo "::error::Job '$name' did not succeed: $result"
176+
failed=1
177+
fi
178+
done <<< "$RESULTS"
179+
exit $failed

0 commit comments

Comments
 (0)