From bb4e21b2fa85547910fd6dd9feba40fdf6bc3a03 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 28 Jul 2026 18:06:47 +0000 Subject: [PATCH] ci: add required PR status check Co-authored-by: Alejandro Mata Ali --- .github/workflows/python-app.yml | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 97eb018..4224104 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -3,14 +3,8 @@ name: Python application on: push: branches: [ "main" ] - paths-ignore: - - "**/*.md" - - "docs/**" pull_request: branches: [ "main" ] - paths-ignore: - - "**/*.md" - - "docs/**" permissions: contents: read @@ -49,3 +43,27 @@ jobs: - name: Test with pytest run: | python -m pytest + + required-pr-ci: + name: ${{ github.event_name == 'pull_request' && 'required-pr-ci' || 'push-ci-summary' }} + if: ${{ always() }} + needs: + - build + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: Validate required jobs + shell: bash + env: + EVENT_NAME: ${{ github.event_name }} + BUILD_RESULT: ${{ needs.build.result }} + run: | + set -euo pipefail + + if [[ "${BUILD_RESULT}" != "success" ]]; then + echo "Required job build finished with '${BUILD_RESULT}', expected success." + exit 1 + fi + + echo "All required jobs passed."