diff --git a/.asf.yaml b/.asf.yaml index f2ad36521bf..6c517f69c8f 100644 --- a/.asf.yaml +++ b/.asf.yaml @@ -85,11 +85,11 @@ github: - pre-commit (current) - pre-commit (previous) - test-mysql - - test-postgres (current) + - test-postgres-required - test-postgres-hive - test-postgres-presto - test-sqlite - - unit-tests (current) + - unit-tests-required required_pull_request_reviews: dismiss_stale_reviews: false diff --git a/.github/workflows/superset-python-integrationtest.yml b/.github/workflows/superset-python-integrationtest.yml index bff9d667e5b..504e3853005 100644 --- a/.github/workflows/superset-python-integrationtest.yml +++ b/.github/workflows/superset-python-integrationtest.yml @@ -226,3 +226,25 @@ jobs: verbose: true use_oidc: true slug: apache/superset + + # Stable required-status-check anchor for the matrix-based test-postgres job. + # It is gated on change detection, so on non-Python PRs it is skipped and + # never produces its `test-postgres (current)` context (a job-level skip + # happens before matrix expansion). This always-running job reports a single + # context branch protection can require: it passes when test-postgres + # succeeded or was skipped, and fails only on a real failure. + test-postgres-required: + needs: [changes, test-postgres] + if: always() + runs-on: ubuntu-24.04 + timeout-minutes: 5 + steps: + - name: Check test-postgres result + env: + RESULT: ${{ needs.test-postgres.result }} + run: | + if [ "$RESULT" != "success" ] && [ "$RESULT" != "skipped" ]; then + echo "test-postgres did not pass (result: $RESULT)" + exit 1 + fi + echo "test-postgres result: $RESULT" diff --git a/.github/workflows/superset-python-unittest.yml b/.github/workflows/superset-python-unittest.yml index 9d16eb1057d..5eb368c18db 100644 --- a/.github/workflows/superset-python-unittest.yml +++ b/.github/workflows/superset-python-unittest.yml @@ -76,3 +76,25 @@ jobs: verbose: true use_oidc: true slug: apache/superset + + # Stable required-status-check anchor. `unit-tests` is a matrix job gated on + # change detection, so on non-Python PRs it is skipped and never produces its + # `unit-tests (current)` context (a job-level skip happens before matrix + # expansion). This always-running job reports a single context that branch + # protection can require: it passes when unit-tests succeeded or was skipped, + # and fails only on a real failure. + unit-tests-required: + needs: [changes, unit-tests] + if: always() + runs-on: ubuntu-24.04 + timeout-minutes: 5 + steps: + - name: Check unit-tests result + env: + RESULT: ${{ needs.unit-tests.result }} + run: | + if [ "$RESULT" != "success" ] && [ "$RESULT" != "skipped" ]; then + echo "unit-tests did not pass (result: $RESULT)" + exit 1 + fi + echo "unit-tests result: $RESULT"