From 51f78f19a16bcd1ba4d9382aa440cf730f529279 Mon Sep 17 00:00:00 2001 From: Stephanie Anderson Date: Thu, 26 Mar 2026 19:12:02 +0100 Subject: [PATCH 1/5] ci: Skip test suite when no code files changed Add a `changes` detection job using dorny/paths-filter to all test workflows and ci.yml. Tests are only triggered when code-relevant files are modified (*.py, *.cfg, *.toml, *.ini, sentry_sdk/**, tests/**, scripts/**, Makefile, .github/workflows/**). PRs that only touch non-code files (e.g. README.md) will skip the full test matrix, saving CI resources. Pushes to master/release branches always run the full suite. The gate jobs ("All X tests passed") now accept `skipped` as a valid result so required status checks still pass when tests are skipped. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/ci.yml | 28 +++++++++++++++++++ .../workflows/test-integrations-agents.yml | 27 ++++++++++++++++-- .../test-integrations-ai-workflow.yml | 27 ++++++++++++++++-- .github/workflows/test-integrations-ai.yml | 27 ++++++++++++++++-- .github/workflows/test-integrations-cloud.yml | 27 ++++++++++++++++-- .../workflows/test-integrations-common.yml | 27 ++++++++++++++++-- .github/workflows/test-integrations-dbs.yml | 27 ++++++++++++++++-- .github/workflows/test-integrations-flags.yml | 27 ++++++++++++++++-- .../workflows/test-integrations-gevent.yml | 27 ++++++++++++++++-- .../workflows/test-integrations-graphql.yml | 27 ++++++++++++++++-- .github/workflows/test-integrations-mcp.yml | 27 ++++++++++++++++-- .github/workflows/test-integrations-misc.yml | 27 ++++++++++++++++-- .../workflows/test-integrations-network.yml | 27 ++++++++++++++++-- .github/workflows/test-integrations-tasks.yml | 27 ++++++++++++++++-- .github/workflows/test-integrations-web-1.yml | 27 ++++++++++++++++-- .github/workflows/test-integrations-web-2.yml | 27 ++++++++++++++++-- .../split_tox_gh_actions/templates/base.jinja | 22 +++++++++++++++ .../templates/check_required.jinja | 4 +-- .../templates/test_group.jinja | 2 ++ 19 files changed, 429 insertions(+), 32 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ee3d24db79..8388061933 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,31 @@ env: ${{ github.workspace }}/dist-serverless jobs: + changes: + runs-on: ubuntu-22.04 + outputs: + has_code_changes: ${{ github.event_name != 'pull_request' || steps.changes.outputs.has_code_changes }} + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + id: changes + if: github.event_name == 'pull_request' + with: + filters: | + has_code_changes: + - 'sentry_sdk/**' + - 'tests/**' + - 'scripts/**' + - '**/*.py' + - '**/*.cfg' + - '**/*.toml' + - '**/*.ini' + - 'Makefile' + - '.github/workflows/**' + lint: + needs: changes + if: needs.changes.outputs.has_code_changes == 'true' name: Lint Sources runs-on: ubuntu-latest timeout-minutes: 10 @@ -33,6 +57,8 @@ jobs: tox -e linters build_lambda_layer: + needs: changes + if: needs.changes.outputs.has_code_changes == 'true' name: Build Package runs-on: ubuntu-latest timeout-minutes: 10 @@ -62,6 +88,8 @@ jobs: if-no-files-found: 'error' docs: + needs: changes + if: needs.changes.outputs.has_code_changes == 'true' name: Build SDK API Doc runs-on: ubuntu-latest timeout-minutes: 10 diff --git a/.github/workflows/test-integrations-agents.yml b/.github/workflows/test-integrations-agents.yml index fbb983ef03..d751224b1c 100644 --- a/.github/workflows/test-integrations-agents.yml +++ b/.github/workflows/test-integrations-agents.yml @@ -25,7 +25,30 @@ env: CACHED_BUILD_PATHS: | ${{ github.workspace }}/dist-serverless jobs: + changes: + runs-on: ubuntu-22.04 + outputs: + has_code_changes: ${{ github.event_name != 'pull_request' || steps.changes.outputs.has_code_changes }} + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + id: changes + if: github.event_name == 'pull_request' + with: + filters: | + has_code_changes: + - 'sentry_sdk/**' + - 'tests/**' + - 'scripts/**' + - '**/*.py' + - '**/*.cfg' + - '**/*.toml' + - '**/*.ini' + - 'Makefile' + - '.github/workflows/**' test-agents: + needs: changes + if: needs.changes.outputs.has_code_changes == 'true' name: Agents timeout-minutes: 30 runs-on: ${{ matrix.os }} @@ -82,12 +105,12 @@ jobs: verbose: true check_required_tests: name: All Agents tests passed - needs: test-agents + needs: [changes, test-agents] # Always run this, even if a dependent job failed if: always() runs-on: ubuntu-22.04 steps: - name: Check for failures - if: needs.test-agents.result != 'success' + if: needs.test-agents.result != 'success' && needs.test-agents.result != 'skipped' run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-ai-workflow.yml b/.github/workflows/test-integrations-ai-workflow.yml index a3e2bf5c0e..87a94e247f 100644 --- a/.github/workflows/test-integrations-ai-workflow.yml +++ b/.github/workflows/test-integrations-ai-workflow.yml @@ -25,7 +25,30 @@ env: CACHED_BUILD_PATHS: | ${{ github.workspace }}/dist-serverless jobs: + changes: + runs-on: ubuntu-22.04 + outputs: + has_code_changes: ${{ github.event_name != 'pull_request' || steps.changes.outputs.has_code_changes }} + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + id: changes + if: github.event_name == 'pull_request' + with: + filters: | + has_code_changes: + - 'sentry_sdk/**' + - 'tests/**' + - 'scripts/**' + - '**/*.py' + - '**/*.cfg' + - '**/*.toml' + - '**/*.ini' + - 'Makefile' + - '.github/workflows/**' test-ai_workflow: + needs: changes + if: needs.changes.outputs.has_code_changes == 'true' name: AI Workflow timeout-minutes: 30 runs-on: ${{ matrix.os }} @@ -86,12 +109,12 @@ jobs: verbose: true check_required_tests: name: All AI Workflow tests passed - needs: test-ai_workflow + needs: [changes, test-ai_workflow] # Always run this, even if a dependent job failed if: always() runs-on: ubuntu-22.04 steps: - name: Check for failures - if: needs.test-ai_workflow.result != 'success' + if: needs.test-ai_workflow.result != 'success' && needs.test-ai_workflow.result != 'skipped' run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-ai.yml b/.github/workflows/test-integrations-ai.yml index 5559a72f34..1ad825910e 100644 --- a/.github/workflows/test-integrations-ai.yml +++ b/.github/workflows/test-integrations-ai.yml @@ -25,7 +25,30 @@ env: CACHED_BUILD_PATHS: | ${{ github.workspace }}/dist-serverless jobs: + changes: + runs-on: ubuntu-22.04 + outputs: + has_code_changes: ${{ github.event_name != 'pull_request' || steps.changes.outputs.has_code_changes }} + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + id: changes + if: github.event_name == 'pull_request' + with: + filters: | + has_code_changes: + - 'sentry_sdk/**' + - 'tests/**' + - 'scripts/**' + - '**/*.py' + - '**/*.cfg' + - '**/*.toml' + - '**/*.ini' + - 'Makefile' + - '.github/workflows/**' test-ai: + needs: changes + if: needs.changes.outputs.has_code_changes == 'true' name: AI timeout-minutes: 30 runs-on: ${{ matrix.os }} @@ -102,12 +125,12 @@ jobs: verbose: true check_required_tests: name: All AI tests passed - needs: test-ai + needs: [changes, test-ai] # Always run this, even if a dependent job failed if: always() runs-on: ubuntu-22.04 steps: - name: Check for failures - if: needs.test-ai.result != 'success' + if: needs.test-ai.result != 'success' && needs.test-ai.result != 'skipped' run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-cloud.yml b/.github/workflows/test-integrations-cloud.yml index 97aed9e30b..e84f5af64d 100644 --- a/.github/workflows/test-integrations-cloud.yml +++ b/.github/workflows/test-integrations-cloud.yml @@ -25,7 +25,30 @@ env: CACHED_BUILD_PATHS: | ${{ github.workspace }}/dist-serverless jobs: + changes: + runs-on: ubuntu-22.04 + outputs: + has_code_changes: ${{ github.event_name != 'pull_request' || steps.changes.outputs.has_code_changes }} + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + id: changes + if: github.event_name == 'pull_request' + with: + filters: | + has_code_changes: + - 'sentry_sdk/**' + - 'tests/**' + - 'scripts/**' + - '**/*.py' + - '**/*.cfg' + - '**/*.toml' + - '**/*.ini' + - 'Makefile' + - '.github/workflows/**' test-cloud: + needs: changes + if: needs.changes.outputs.has_code_changes == 'true' name: Cloud timeout-minutes: 30 runs-on: ${{ matrix.os }} @@ -98,12 +121,12 @@ jobs: verbose: true check_required_tests: name: All Cloud tests passed - needs: test-cloud + needs: [changes, test-cloud] # Always run this, even if a dependent job failed if: always() runs-on: ubuntu-22.04 steps: - name: Check for failures - if: needs.test-cloud.result != 'success' + if: needs.test-cloud.result != 'success' && needs.test-cloud.result != 'skipped' run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-common.yml b/.github/workflows/test-integrations-common.yml index 6523ce084e..3d9bf0ceff 100644 --- a/.github/workflows/test-integrations-common.yml +++ b/.github/workflows/test-integrations-common.yml @@ -25,7 +25,30 @@ env: CACHED_BUILD_PATHS: | ${{ github.workspace }}/dist-serverless jobs: + changes: + runs-on: ubuntu-22.04 + outputs: + has_code_changes: ${{ github.event_name != 'pull_request' || steps.changes.outputs.has_code_changes }} + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + id: changes + if: github.event_name == 'pull_request' + with: + filters: | + has_code_changes: + - 'sentry_sdk/**' + - 'tests/**' + - 'scripts/**' + - '**/*.py' + - '**/*.cfg' + - '**/*.toml' + - '**/*.ini' + - 'Makefile' + - '.github/workflows/**' test-common: + needs: changes + if: needs.changes.outputs.has_code_changes == 'true' name: Common timeout-minutes: 30 runs-on: ${{ matrix.os }} @@ -78,12 +101,12 @@ jobs: verbose: true check_required_tests: name: All Common tests passed - needs: test-common + needs: [changes, test-common] # Always run this, even if a dependent job failed if: always() runs-on: ubuntu-22.04 steps: - name: Check for failures - if: needs.test-common.result != 'success' + if: needs.test-common.result != 'success' && needs.test-common.result != 'skipped' run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-dbs.yml b/.github/workflows/test-integrations-dbs.yml index 380ded2f80..6c3493568f 100644 --- a/.github/workflows/test-integrations-dbs.yml +++ b/.github/workflows/test-integrations-dbs.yml @@ -25,7 +25,30 @@ env: CACHED_BUILD_PATHS: | ${{ github.workspace }}/dist-serverless jobs: + changes: + runs-on: ubuntu-22.04 + outputs: + has_code_changes: ${{ github.event_name != 'pull_request' || steps.changes.outputs.has_code_changes }} + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + id: changes + if: github.event_name == 'pull_request' + with: + filters: | + has_code_changes: + - 'sentry_sdk/**' + - 'tests/**' + - 'scripts/**' + - '**/*.py' + - '**/*.cfg' + - '**/*.toml' + - '**/*.ini' + - 'Makefile' + - '.github/workflows/**' test-dbs: + needs: changes + if: needs.changes.outputs.has_code_changes == 'true' name: DBs timeout-minutes: 30 runs-on: ${{ matrix.os }} @@ -118,12 +141,12 @@ jobs: verbose: true check_required_tests: name: All DBs tests passed - needs: test-dbs + needs: [changes, test-dbs] # Always run this, even if a dependent job failed if: always() runs-on: ubuntu-22.04 steps: - name: Check for failures - if: needs.test-dbs.result != 'success' + if: needs.test-dbs.result != 'success' && needs.test-dbs.result != 'skipped' run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-flags.yml b/.github/workflows/test-integrations-flags.yml index 13897537af..9c247e15ba 100644 --- a/.github/workflows/test-integrations-flags.yml +++ b/.github/workflows/test-integrations-flags.yml @@ -25,7 +25,30 @@ env: CACHED_BUILD_PATHS: | ${{ github.workspace }}/dist-serverless jobs: + changes: + runs-on: ubuntu-22.04 + outputs: + has_code_changes: ${{ github.event_name != 'pull_request' || steps.changes.outputs.has_code_changes }} + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + id: changes + if: github.event_name == 'pull_request' + with: + filters: | + has_code_changes: + - 'sentry_sdk/**' + - 'tests/**' + - 'scripts/**' + - '**/*.py' + - '**/*.cfg' + - '**/*.toml' + - '**/*.ini' + - 'Makefile' + - '.github/workflows/**' test-flags: + needs: changes + if: needs.changes.outputs.has_code_changes == 'true' name: Flags timeout-minutes: 30 runs-on: ${{ matrix.os }} @@ -90,12 +113,12 @@ jobs: verbose: true check_required_tests: name: All Flags tests passed - needs: test-flags + needs: [changes, test-flags] # Always run this, even if a dependent job failed if: always() runs-on: ubuntu-22.04 steps: - name: Check for failures - if: needs.test-flags.result != 'success' + if: needs.test-flags.result != 'success' && needs.test-flags.result != 'skipped' run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-gevent.yml b/.github/workflows/test-integrations-gevent.yml index 934498b96c..bac283ee46 100644 --- a/.github/workflows/test-integrations-gevent.yml +++ b/.github/workflows/test-integrations-gevent.yml @@ -25,7 +25,30 @@ env: CACHED_BUILD_PATHS: | ${{ github.workspace }}/dist-serverless jobs: + changes: + runs-on: ubuntu-22.04 + outputs: + has_code_changes: ${{ github.event_name != 'pull_request' || steps.changes.outputs.has_code_changes }} + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + id: changes + if: github.event_name == 'pull_request' + with: + filters: | + has_code_changes: + - 'sentry_sdk/**' + - 'tests/**' + - 'scripts/**' + - '**/*.py' + - '**/*.cfg' + - '**/*.toml' + - '**/*.ini' + - 'Makefile' + - '.github/workflows/**' test-gevent: + needs: changes + if: needs.changes.outputs.has_code_changes == 'true' name: Gevent timeout-minutes: 30 runs-on: ${{ matrix.os }} @@ -78,12 +101,12 @@ jobs: verbose: true check_required_tests: name: All Gevent tests passed - needs: test-gevent + needs: [changes, test-gevent] # Always run this, even if a dependent job failed if: always() runs-on: ubuntu-22.04 steps: - name: Check for failures - if: needs.test-gevent.result != 'success' + if: needs.test-gevent.result != 'success' && needs.test-gevent.result != 'skipped' run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-graphql.yml b/.github/workflows/test-integrations-graphql.yml index d26b4a422a..6ada136532 100644 --- a/.github/workflows/test-integrations-graphql.yml +++ b/.github/workflows/test-integrations-graphql.yml @@ -25,7 +25,30 @@ env: CACHED_BUILD_PATHS: | ${{ github.workspace }}/dist-serverless jobs: + changes: + runs-on: ubuntu-22.04 + outputs: + has_code_changes: ${{ github.event_name != 'pull_request' || steps.changes.outputs.has_code_changes }} + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + id: changes + if: github.event_name == 'pull_request' + with: + filters: | + has_code_changes: + - 'sentry_sdk/**' + - 'tests/**' + - 'scripts/**' + - '**/*.py' + - '**/*.cfg' + - '**/*.toml' + - '**/*.ini' + - 'Makefile' + - '.github/workflows/**' test-graphql: + needs: changes + if: needs.changes.outputs.has_code_changes == 'true' name: GraphQL timeout-minutes: 30 runs-on: ${{ matrix.os }} @@ -90,12 +113,12 @@ jobs: verbose: true check_required_tests: name: All GraphQL tests passed - needs: test-graphql + needs: [changes, test-graphql] # Always run this, even if a dependent job failed if: always() runs-on: ubuntu-22.04 steps: - name: Check for failures - if: needs.test-graphql.result != 'success' + if: needs.test-graphql.result != 'success' && needs.test-graphql.result != 'skipped' run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-mcp.yml b/.github/workflows/test-integrations-mcp.yml index 0611f9a249..a409768a16 100644 --- a/.github/workflows/test-integrations-mcp.yml +++ b/.github/workflows/test-integrations-mcp.yml @@ -25,7 +25,30 @@ env: CACHED_BUILD_PATHS: | ${{ github.workspace }}/dist-serverless jobs: + changes: + runs-on: ubuntu-22.04 + outputs: + has_code_changes: ${{ github.event_name != 'pull_request' || steps.changes.outputs.has_code_changes }} + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + id: changes + if: github.event_name == 'pull_request' + with: + filters: | + has_code_changes: + - 'sentry_sdk/**' + - 'tests/**' + - 'scripts/**' + - '**/*.py' + - '**/*.cfg' + - '**/*.toml' + - '**/*.ini' + - 'Makefile' + - '.github/workflows/**' test-mcp: + needs: changes + if: needs.changes.outputs.has_code_changes == 'true' name: MCP timeout-minutes: 30 runs-on: ${{ matrix.os }} @@ -82,12 +105,12 @@ jobs: verbose: true check_required_tests: name: All MCP tests passed - needs: test-mcp + needs: [changes, test-mcp] # Always run this, even if a dependent job failed if: always() runs-on: ubuntu-22.04 steps: - name: Check for failures - if: needs.test-mcp.result != 'success' + if: needs.test-mcp.result != 'success' && needs.test-mcp.result != 'skipped' run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-misc.yml b/.github/workflows/test-integrations-misc.yml index 8787acb8ca..961dbef510 100644 --- a/.github/workflows/test-integrations-misc.yml +++ b/.github/workflows/test-integrations-misc.yml @@ -25,7 +25,30 @@ env: CACHED_BUILD_PATHS: | ${{ github.workspace }}/dist-serverless jobs: + changes: + runs-on: ubuntu-22.04 + outputs: + has_code_changes: ${{ github.event_name != 'pull_request' || steps.changes.outputs.has_code_changes }} + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + id: changes + if: github.event_name == 'pull_request' + with: + filters: | + has_code_changes: + - 'sentry_sdk/**' + - 'tests/**' + - 'scripts/**' + - '**/*.py' + - '**/*.cfg' + - '**/*.toml' + - '**/*.ini' + - 'Makefile' + - '.github/workflows/**' test-misc: + needs: changes + if: needs.changes.outputs.has_code_changes == 'true' name: Misc timeout-minutes: 30 runs-on: ${{ matrix.os }} @@ -110,12 +133,12 @@ jobs: verbose: true check_required_tests: name: All Misc tests passed - needs: test-misc + needs: [changes, test-misc] # Always run this, even if a dependent job failed if: always() runs-on: ubuntu-22.04 steps: - name: Check for failures - if: needs.test-misc.result != 'success' + if: needs.test-misc.result != 'success' && needs.test-misc.result != 'skipped' run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-network.yml b/.github/workflows/test-integrations-network.yml index 6bdb2e99ed..f321984c38 100644 --- a/.github/workflows/test-integrations-network.yml +++ b/.github/workflows/test-integrations-network.yml @@ -25,7 +25,30 @@ env: CACHED_BUILD_PATHS: | ${{ github.workspace }}/dist-serverless jobs: + changes: + runs-on: ubuntu-22.04 + outputs: + has_code_changes: ${{ github.event_name != 'pull_request' || steps.changes.outputs.has_code_changes }} + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + id: changes + if: github.event_name == 'pull_request' + with: + filters: | + has_code_changes: + - 'sentry_sdk/**' + - 'tests/**' + - 'scripts/**' + - '**/*.py' + - '**/*.cfg' + - '**/*.toml' + - '**/*.ini' + - 'Makefile' + - '.github/workflows/**' test-network: + needs: changes + if: needs.changes.outputs.has_code_changes == 'true' name: Network timeout-minutes: 30 runs-on: ${{ matrix.os }} @@ -86,12 +109,12 @@ jobs: verbose: true check_required_tests: name: All Network tests passed - needs: test-network + needs: [changes, test-network] # Always run this, even if a dependent job failed if: always() runs-on: ubuntu-22.04 steps: - name: Check for failures - if: needs.test-network.result != 'success' + if: needs.test-network.result != 'success' && needs.test-network.result != 'skipped' run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-tasks.yml b/.github/workflows/test-integrations-tasks.yml index 085714d756..3ce902f64b 100644 --- a/.github/workflows/test-integrations-tasks.yml +++ b/.github/workflows/test-integrations-tasks.yml @@ -25,7 +25,30 @@ env: CACHED_BUILD_PATHS: | ${{ github.workspace }}/dist-serverless jobs: + changes: + runs-on: ubuntu-22.04 + outputs: + has_code_changes: ${{ github.event_name != 'pull_request' || steps.changes.outputs.has_code_changes }} + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + id: changes + if: github.event_name == 'pull_request' + with: + filters: | + has_code_changes: + - 'sentry_sdk/**' + - 'tests/**' + - 'scripts/**' + - '**/*.py' + - '**/*.cfg' + - '**/*.toml' + - '**/*.ini' + - 'Makefile' + - '.github/workflows/**' test-tasks: + needs: changes + if: needs.changes.outputs.has_code_changes == 'true' name: Tasks timeout-minutes: 30 runs-on: ${{ matrix.os }} @@ -113,12 +136,12 @@ jobs: verbose: true check_required_tests: name: All Tasks tests passed - needs: test-tasks + needs: [changes, test-tasks] # Always run this, even if a dependent job failed if: always() runs-on: ubuntu-22.04 steps: - name: Check for failures - if: needs.test-tasks.result != 'success' + if: needs.test-tasks.result != 'success' && needs.test-tasks.result != 'skipped' run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-web-1.yml b/.github/workflows/test-integrations-web-1.yml index 48797f5dcf..425466b029 100644 --- a/.github/workflows/test-integrations-web-1.yml +++ b/.github/workflows/test-integrations-web-1.yml @@ -25,7 +25,30 @@ env: CACHED_BUILD_PATHS: | ${{ github.workspace }}/dist-serverless jobs: + changes: + runs-on: ubuntu-22.04 + outputs: + has_code_changes: ${{ github.event_name != 'pull_request' || steps.changes.outputs.has_code_changes }} + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + id: changes + if: github.event_name == 'pull_request' + with: + filters: | + has_code_changes: + - 'sentry_sdk/**' + - 'tests/**' + - 'scripts/**' + - '**/*.py' + - '**/*.cfg' + - '**/*.toml' + - '**/*.ini' + - 'Makefile' + - '.github/workflows/**' test-web_1: + needs: changes + if: needs.changes.outputs.has_code_changes == 'true' name: Web 1 timeout-minutes: 30 runs-on: ${{ matrix.os }} @@ -108,12 +131,12 @@ jobs: verbose: true check_required_tests: name: All Web 1 tests passed - needs: test-web_1 + needs: [changes, test-web_1] # Always run this, even if a dependent job failed if: always() runs-on: ubuntu-22.04 steps: - name: Check for failures - if: needs.test-web_1.result != 'success' + if: needs.test-web_1.result != 'success' && needs.test-web_1.result != 'skipped' run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-web-2.yml b/.github/workflows/test-integrations-web-2.yml index 87f69d36bd..8be5598fd6 100644 --- a/.github/workflows/test-integrations-web-2.yml +++ b/.github/workflows/test-integrations-web-2.yml @@ -25,7 +25,30 @@ env: CACHED_BUILD_PATHS: | ${{ github.workspace }}/dist-serverless jobs: + changes: + runs-on: ubuntu-22.04 + outputs: + has_code_changes: ${{ github.event_name != 'pull_request' || steps.changes.outputs.has_code_changes }} + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + id: changes + if: github.event_name == 'pull_request' + with: + filters: | + has_code_changes: + - 'sentry_sdk/**' + - 'tests/**' + - 'scripts/**' + - '**/*.py' + - '**/*.cfg' + - '**/*.toml' + - '**/*.ini' + - 'Makefile' + - '.github/workflows/**' test-web_2: + needs: changes + if: needs.changes.outputs.has_code_changes == 'true' name: Web 2 timeout-minutes: 30 runs-on: ${{ matrix.os }} @@ -114,12 +137,12 @@ jobs: verbose: true check_required_tests: name: All Web 2 tests passed - needs: test-web_2 + needs: [changes, test-web_2] # Always run this, even if a dependent job failed if: always() runs-on: ubuntu-22.04 steps: - name: Check for failures - if: needs.test-web_2.result != 'success' + if: needs.test-web_2.result != 'success' && needs.test-web_2.result != 'skipped' run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/scripts/split_tox_gh_actions/templates/base.jinja b/scripts/split_tox_gh_actions/templates/base.jinja index c3bc528a7c..ac45cb79af 100644 --- a/scripts/split_tox_gh_actions/templates/base.jinja +++ b/scripts/split_tox_gh_actions/templates/base.jinja @@ -33,6 +33,28 @@ env: {% raw %}${{ github.workspace }}/dist-serverless{% endraw %} jobs: + changes: + runs-on: ubuntu-22.04 + outputs: + has_code_changes: {% raw %}${{ github.event_name != 'pull_request' || steps.changes.outputs.has_code_changes }}{% endraw %} + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + id: changes + if: {% raw %}github.event_name == 'pull_request'{% endraw %} + with: + filters: | + has_code_changes: + - 'sentry_sdk/**' + - 'tests/**' + - 'scripts/**' + - '**/*.py' + - '**/*.cfg' + - '**/*.toml' + - '**/*.ini' + - 'Makefile' + - '.github/workflows/**' + {% include "test_group.jinja" %} {% include "check_required.jinja" %} {% endwith %} diff --git a/scripts/split_tox_gh_actions/templates/check_required.jinja b/scripts/split_tox_gh_actions/templates/check_required.jinja index 37d4f8fd78..1bf52292b6 100644 --- a/scripts/split_tox_gh_actions/templates/check_required.jinja +++ b/scripts/split_tox_gh_actions/templates/check_required.jinja @@ -1,11 +1,11 @@ check_required_tests: name: All {{ group }} tests passed - needs: test-{{ group | replace(" ", "_") | lower }} + needs: [changes, test-{{ group | replace(" ", "_") | lower }}] # Always run this, even if a dependent job failed if: always() runs-on: ubuntu-22.04 steps: - name: Check for failures - if: needs.test-{{ lowercase_group }}.result != 'success' + if: needs.test-{{ lowercase_group }}.result != 'success' && needs.test-{{ lowercase_group }}.result != 'skipped' run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/scripts/split_tox_gh_actions/templates/test_group.jinja b/scripts/split_tox_gh_actions/templates/test_group.jinja index fa6d31c55f..cb72b85425 100644 --- a/scripts/split_tox_gh_actions/templates/test_group.jinja +++ b/scripts/split_tox_gh_actions/templates/test_group.jinja @@ -1,4 +1,6 @@ test-{{ lowercase_group }}: + needs: changes + if: needs.changes.outputs.has_code_changes == 'true' name: {{ group }} timeout-minutes: 30 runs-on: {% raw %}${{ matrix.os }}{% endraw %} From 349e6a589f7d2a873f8babc278c362a54f562cdd Mon Sep 17 00:00:00 2001 From: Stephanie Anderson Date: Thu, 26 Mar 2026 19:44:44 +0100 Subject: [PATCH 2/5] ci: Address warden review feedback - Add requirements*.txt to path filters so dependency changes trigger CI - Gate job now also fails if the changes detection job itself fails, preventing untested code from passing CI when change detection errors Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/ci.yml | 1 + .github/workflows/test-integrations-agents.yml | 5 ++++- .github/workflows/test-integrations-ai-workflow.yml | 5 ++++- .github/workflows/test-integrations-ai.yml | 5 ++++- .github/workflows/test-integrations-cloud.yml | 5 ++++- .github/workflows/test-integrations-common.yml | 5 ++++- .github/workflows/test-integrations-dbs.yml | 5 ++++- .github/workflows/test-integrations-flags.yml | 5 ++++- .github/workflows/test-integrations-gevent.yml | 5 ++++- .github/workflows/test-integrations-graphql.yml | 5 ++++- .github/workflows/test-integrations-mcp.yml | 5 ++++- .github/workflows/test-integrations-misc.yml | 5 ++++- .github/workflows/test-integrations-network.yml | 5 ++++- .github/workflows/test-integrations-tasks.yml | 5 ++++- .github/workflows/test-integrations-web-1.yml | 5 ++++- .github/workflows/test-integrations-web-2.yml | 5 ++++- scripts/split_tox_gh_actions/templates/base.jinja | 1 + scripts/split_tox_gh_actions/templates/check_required.jinja | 4 +++- 18 files changed, 65 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8388061933..17446f824a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,6 +37,7 @@ jobs: - '**/*.toml' - '**/*.ini' - 'Makefile' + - 'requirements*.txt' - '.github/workflows/**' lint: diff --git a/.github/workflows/test-integrations-agents.yml b/.github/workflows/test-integrations-agents.yml index d751224b1c..0a4b30e570 100644 --- a/.github/workflows/test-integrations-agents.yml +++ b/.github/workflows/test-integrations-agents.yml @@ -45,6 +45,7 @@ jobs: - '**/*.toml' - '**/*.ini' - 'Makefile' + - 'requirements*.txt' - '.github/workflows/**' test-agents: needs: changes @@ -111,6 +112,8 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Check for failures - if: needs.test-agents.result != 'success' && needs.test-agents.result != 'skipped' + if: | + needs.changes.result == 'failure' || + (needs.test-agents.result != 'success' && needs.test-agents.result != 'skipped') run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-ai-workflow.yml b/.github/workflows/test-integrations-ai-workflow.yml index 87a94e247f..fb9582693e 100644 --- a/.github/workflows/test-integrations-ai-workflow.yml +++ b/.github/workflows/test-integrations-ai-workflow.yml @@ -45,6 +45,7 @@ jobs: - '**/*.toml' - '**/*.ini' - 'Makefile' + - 'requirements*.txt' - '.github/workflows/**' test-ai_workflow: needs: changes @@ -115,6 +116,8 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Check for failures - if: needs.test-ai_workflow.result != 'success' && needs.test-ai_workflow.result != 'skipped' + if: | + needs.changes.result == 'failure' || + (needs.test-ai_workflow.result != 'success' && needs.test-ai_workflow.result != 'skipped') run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-ai.yml b/.github/workflows/test-integrations-ai.yml index 1ad825910e..82ca33ca33 100644 --- a/.github/workflows/test-integrations-ai.yml +++ b/.github/workflows/test-integrations-ai.yml @@ -45,6 +45,7 @@ jobs: - '**/*.toml' - '**/*.ini' - 'Makefile' + - 'requirements*.txt' - '.github/workflows/**' test-ai: needs: changes @@ -131,6 +132,8 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Check for failures - if: needs.test-ai.result != 'success' && needs.test-ai.result != 'skipped' + if: | + needs.changes.result == 'failure' || + (needs.test-ai.result != 'success' && needs.test-ai.result != 'skipped') run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-cloud.yml b/.github/workflows/test-integrations-cloud.yml index e84f5af64d..934abf2ee9 100644 --- a/.github/workflows/test-integrations-cloud.yml +++ b/.github/workflows/test-integrations-cloud.yml @@ -45,6 +45,7 @@ jobs: - '**/*.toml' - '**/*.ini' - 'Makefile' + - 'requirements*.txt' - '.github/workflows/**' test-cloud: needs: changes @@ -127,6 +128,8 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Check for failures - if: needs.test-cloud.result != 'success' && needs.test-cloud.result != 'skipped' + if: | + needs.changes.result == 'failure' || + (needs.test-cloud.result != 'success' && needs.test-cloud.result != 'skipped') run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-common.yml b/.github/workflows/test-integrations-common.yml index 3d9bf0ceff..7cb45898b9 100644 --- a/.github/workflows/test-integrations-common.yml +++ b/.github/workflows/test-integrations-common.yml @@ -45,6 +45,7 @@ jobs: - '**/*.toml' - '**/*.ini' - 'Makefile' + - 'requirements*.txt' - '.github/workflows/**' test-common: needs: changes @@ -107,6 +108,8 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Check for failures - if: needs.test-common.result != 'success' && needs.test-common.result != 'skipped' + if: | + needs.changes.result == 'failure' || + (needs.test-common.result != 'success' && needs.test-common.result != 'skipped') run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-dbs.yml b/.github/workflows/test-integrations-dbs.yml index 6c3493568f..4050a18cfd 100644 --- a/.github/workflows/test-integrations-dbs.yml +++ b/.github/workflows/test-integrations-dbs.yml @@ -45,6 +45,7 @@ jobs: - '**/*.toml' - '**/*.ini' - 'Makefile' + - 'requirements*.txt' - '.github/workflows/**' test-dbs: needs: changes @@ -147,6 +148,8 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Check for failures - if: needs.test-dbs.result != 'success' && needs.test-dbs.result != 'skipped' + if: | + needs.changes.result == 'failure' || + (needs.test-dbs.result != 'success' && needs.test-dbs.result != 'skipped') run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-flags.yml b/.github/workflows/test-integrations-flags.yml index 9c247e15ba..6ee10d2154 100644 --- a/.github/workflows/test-integrations-flags.yml +++ b/.github/workflows/test-integrations-flags.yml @@ -45,6 +45,7 @@ jobs: - '**/*.toml' - '**/*.ini' - 'Makefile' + - 'requirements*.txt' - '.github/workflows/**' test-flags: needs: changes @@ -119,6 +120,8 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Check for failures - if: needs.test-flags.result != 'success' && needs.test-flags.result != 'skipped' + if: | + needs.changes.result == 'failure' || + (needs.test-flags.result != 'success' && needs.test-flags.result != 'skipped') run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-gevent.yml b/.github/workflows/test-integrations-gevent.yml index bac283ee46..63acdbd259 100644 --- a/.github/workflows/test-integrations-gevent.yml +++ b/.github/workflows/test-integrations-gevent.yml @@ -45,6 +45,7 @@ jobs: - '**/*.toml' - '**/*.ini' - 'Makefile' + - 'requirements*.txt' - '.github/workflows/**' test-gevent: needs: changes @@ -107,6 +108,8 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Check for failures - if: needs.test-gevent.result != 'success' && needs.test-gevent.result != 'skipped' + if: | + needs.changes.result == 'failure' || + (needs.test-gevent.result != 'success' && needs.test-gevent.result != 'skipped') run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-graphql.yml b/.github/workflows/test-integrations-graphql.yml index 6ada136532..b665e273fc 100644 --- a/.github/workflows/test-integrations-graphql.yml +++ b/.github/workflows/test-integrations-graphql.yml @@ -45,6 +45,7 @@ jobs: - '**/*.toml' - '**/*.ini' - 'Makefile' + - 'requirements*.txt' - '.github/workflows/**' test-graphql: needs: changes @@ -119,6 +120,8 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Check for failures - if: needs.test-graphql.result != 'success' && needs.test-graphql.result != 'skipped' + if: | + needs.changes.result == 'failure' || + (needs.test-graphql.result != 'success' && needs.test-graphql.result != 'skipped') run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-mcp.yml b/.github/workflows/test-integrations-mcp.yml index a409768a16..cc7e8df63a 100644 --- a/.github/workflows/test-integrations-mcp.yml +++ b/.github/workflows/test-integrations-mcp.yml @@ -45,6 +45,7 @@ jobs: - '**/*.toml' - '**/*.ini' - 'Makefile' + - 'requirements*.txt' - '.github/workflows/**' test-mcp: needs: changes @@ -111,6 +112,8 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Check for failures - if: needs.test-mcp.result != 'success' && needs.test-mcp.result != 'skipped' + if: | + needs.changes.result == 'failure' || + (needs.test-mcp.result != 'success' && needs.test-mcp.result != 'skipped') run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-misc.yml b/.github/workflows/test-integrations-misc.yml index 961dbef510..bf81976f82 100644 --- a/.github/workflows/test-integrations-misc.yml +++ b/.github/workflows/test-integrations-misc.yml @@ -45,6 +45,7 @@ jobs: - '**/*.toml' - '**/*.ini' - 'Makefile' + - 'requirements*.txt' - '.github/workflows/**' test-misc: needs: changes @@ -139,6 +140,8 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Check for failures - if: needs.test-misc.result != 'success' && needs.test-misc.result != 'skipped' + if: | + needs.changes.result == 'failure' || + (needs.test-misc.result != 'success' && needs.test-misc.result != 'skipped') run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-network.yml b/.github/workflows/test-integrations-network.yml index f321984c38..8aa806319e 100644 --- a/.github/workflows/test-integrations-network.yml +++ b/.github/workflows/test-integrations-network.yml @@ -45,6 +45,7 @@ jobs: - '**/*.toml' - '**/*.ini' - 'Makefile' + - 'requirements*.txt' - '.github/workflows/**' test-network: needs: changes @@ -115,6 +116,8 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Check for failures - if: needs.test-network.result != 'success' && needs.test-network.result != 'skipped' + if: | + needs.changes.result == 'failure' || + (needs.test-network.result != 'success' && needs.test-network.result != 'skipped') run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-tasks.yml b/.github/workflows/test-integrations-tasks.yml index 3ce902f64b..9d95919091 100644 --- a/.github/workflows/test-integrations-tasks.yml +++ b/.github/workflows/test-integrations-tasks.yml @@ -45,6 +45,7 @@ jobs: - '**/*.toml' - '**/*.ini' - 'Makefile' + - 'requirements*.txt' - '.github/workflows/**' test-tasks: needs: changes @@ -142,6 +143,8 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Check for failures - if: needs.test-tasks.result != 'success' && needs.test-tasks.result != 'skipped' + if: | + needs.changes.result == 'failure' || + (needs.test-tasks.result != 'success' && needs.test-tasks.result != 'skipped') run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-web-1.yml b/.github/workflows/test-integrations-web-1.yml index 425466b029..5f6836433b 100644 --- a/.github/workflows/test-integrations-web-1.yml +++ b/.github/workflows/test-integrations-web-1.yml @@ -45,6 +45,7 @@ jobs: - '**/*.toml' - '**/*.ini' - 'Makefile' + - 'requirements*.txt' - '.github/workflows/**' test-web_1: needs: changes @@ -137,6 +138,8 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Check for failures - if: needs.test-web_1.result != 'success' && needs.test-web_1.result != 'skipped' + if: | + needs.changes.result == 'failure' || + (needs.test-web_1.result != 'success' && needs.test-web_1.result != 'skipped') run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-web-2.yml b/.github/workflows/test-integrations-web-2.yml index 8be5598fd6..11561cf7e5 100644 --- a/.github/workflows/test-integrations-web-2.yml +++ b/.github/workflows/test-integrations-web-2.yml @@ -45,6 +45,7 @@ jobs: - '**/*.toml' - '**/*.ini' - 'Makefile' + - 'requirements*.txt' - '.github/workflows/**' test-web_2: needs: changes @@ -143,6 +144,8 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Check for failures - if: needs.test-web_2.result != 'success' && needs.test-web_2.result != 'skipped' + if: | + needs.changes.result == 'failure' || + (needs.test-web_2.result != 'success' && needs.test-web_2.result != 'skipped') run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/scripts/split_tox_gh_actions/templates/base.jinja b/scripts/split_tox_gh_actions/templates/base.jinja index ac45cb79af..460081d814 100644 --- a/scripts/split_tox_gh_actions/templates/base.jinja +++ b/scripts/split_tox_gh_actions/templates/base.jinja @@ -53,6 +53,7 @@ jobs: - '**/*.toml' - '**/*.ini' - 'Makefile' + - 'requirements*.txt' - '.github/workflows/**' {% include "test_group.jinja" %} diff --git a/scripts/split_tox_gh_actions/templates/check_required.jinja b/scripts/split_tox_gh_actions/templates/check_required.jinja index 1bf52292b6..a3b1bd4360 100644 --- a/scripts/split_tox_gh_actions/templates/check_required.jinja +++ b/scripts/split_tox_gh_actions/templates/check_required.jinja @@ -6,6 +6,8 @@ runs-on: ubuntu-22.04 steps: - name: Check for failures - if: needs.test-{{ lowercase_group }}.result != 'success' && needs.test-{{ lowercase_group }}.result != 'skipped' + if: | + needs.changes.result == 'failure' || + (needs.test-{{ lowercase_group }}.result != 'success' && needs.test-{{ lowercase_group }}.result != 'skipped') run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 From ec091a1431cc766a883c7d9b673e15440f8ba4e7 Mon Sep 17 00:00:00 2001 From: Stephanie Anderson Date: Thu, 26 Mar 2026 20:31:14 +0100 Subject: [PATCH 3/5] ci: Also skip tests on push when no code files changed Direct pushes to master are not allowed, so there's no need to force-run the full suite on push events. The paths-filter action now runs unconditionally for both push and pull_request events. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/ci.yml | 3 +-- .github/workflows/test-integrations-agents.yml | 3 +-- .github/workflows/test-integrations-ai-workflow.yml | 3 +-- .github/workflows/test-integrations-ai.yml | 3 +-- .github/workflows/test-integrations-cloud.yml | 3 +-- .github/workflows/test-integrations-common.yml | 3 +-- .github/workflows/test-integrations-dbs.yml | 3 +-- .github/workflows/test-integrations-flags.yml | 3 +-- .github/workflows/test-integrations-gevent.yml | 3 +-- .github/workflows/test-integrations-graphql.yml | 3 +-- .github/workflows/test-integrations-mcp.yml | 3 +-- .github/workflows/test-integrations-misc.yml | 3 +-- .github/workflows/test-integrations-network.yml | 3 +-- .github/workflows/test-integrations-tasks.yml | 3 +-- .github/workflows/test-integrations-web-1.yml | 3 +-- .github/workflows/test-integrations-web-2.yml | 3 +-- scripts/split_tox_gh_actions/templates/base.jinja | 3 +-- 17 files changed, 17 insertions(+), 34 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 17446f824a..a74d65b7e3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,12 +20,11 @@ jobs: changes: runs-on: ubuntu-22.04 outputs: - has_code_changes: ${{ github.event_name != 'pull_request' || steps.changes.outputs.has_code_changes }} + has_code_changes: ${{ steps.changes.outputs.has_code_changes }} steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes - if: github.event_name == 'pull_request' with: filters: | has_code_changes: diff --git a/.github/workflows/test-integrations-agents.yml b/.github/workflows/test-integrations-agents.yml index 0a4b30e570..1fe4ee685a 100644 --- a/.github/workflows/test-integrations-agents.yml +++ b/.github/workflows/test-integrations-agents.yml @@ -28,12 +28,11 @@ jobs: changes: runs-on: ubuntu-22.04 outputs: - has_code_changes: ${{ github.event_name != 'pull_request' || steps.changes.outputs.has_code_changes }} + has_code_changes: ${{ steps.changes.outputs.has_code_changes }} steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes - if: github.event_name == 'pull_request' with: filters: | has_code_changes: diff --git a/.github/workflows/test-integrations-ai-workflow.yml b/.github/workflows/test-integrations-ai-workflow.yml index fb9582693e..fbe404969f 100644 --- a/.github/workflows/test-integrations-ai-workflow.yml +++ b/.github/workflows/test-integrations-ai-workflow.yml @@ -28,12 +28,11 @@ jobs: changes: runs-on: ubuntu-22.04 outputs: - has_code_changes: ${{ github.event_name != 'pull_request' || steps.changes.outputs.has_code_changes }} + has_code_changes: ${{ steps.changes.outputs.has_code_changes }} steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes - if: github.event_name == 'pull_request' with: filters: | has_code_changes: diff --git a/.github/workflows/test-integrations-ai.yml b/.github/workflows/test-integrations-ai.yml index 82ca33ca33..2110bdb60e 100644 --- a/.github/workflows/test-integrations-ai.yml +++ b/.github/workflows/test-integrations-ai.yml @@ -28,12 +28,11 @@ jobs: changes: runs-on: ubuntu-22.04 outputs: - has_code_changes: ${{ github.event_name != 'pull_request' || steps.changes.outputs.has_code_changes }} + has_code_changes: ${{ steps.changes.outputs.has_code_changes }} steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes - if: github.event_name == 'pull_request' with: filters: | has_code_changes: diff --git a/.github/workflows/test-integrations-cloud.yml b/.github/workflows/test-integrations-cloud.yml index 934abf2ee9..574ea6651e 100644 --- a/.github/workflows/test-integrations-cloud.yml +++ b/.github/workflows/test-integrations-cloud.yml @@ -28,12 +28,11 @@ jobs: changes: runs-on: ubuntu-22.04 outputs: - has_code_changes: ${{ github.event_name != 'pull_request' || steps.changes.outputs.has_code_changes }} + has_code_changes: ${{ steps.changes.outputs.has_code_changes }} steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes - if: github.event_name == 'pull_request' with: filters: | has_code_changes: diff --git a/.github/workflows/test-integrations-common.yml b/.github/workflows/test-integrations-common.yml index 7cb45898b9..7d1b41fa7d 100644 --- a/.github/workflows/test-integrations-common.yml +++ b/.github/workflows/test-integrations-common.yml @@ -28,12 +28,11 @@ jobs: changes: runs-on: ubuntu-22.04 outputs: - has_code_changes: ${{ github.event_name != 'pull_request' || steps.changes.outputs.has_code_changes }} + has_code_changes: ${{ steps.changes.outputs.has_code_changes }} steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes - if: github.event_name == 'pull_request' with: filters: | has_code_changes: diff --git a/.github/workflows/test-integrations-dbs.yml b/.github/workflows/test-integrations-dbs.yml index 4050a18cfd..5a403666c1 100644 --- a/.github/workflows/test-integrations-dbs.yml +++ b/.github/workflows/test-integrations-dbs.yml @@ -28,12 +28,11 @@ jobs: changes: runs-on: ubuntu-22.04 outputs: - has_code_changes: ${{ github.event_name != 'pull_request' || steps.changes.outputs.has_code_changes }} + has_code_changes: ${{ steps.changes.outputs.has_code_changes }} steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes - if: github.event_name == 'pull_request' with: filters: | has_code_changes: diff --git a/.github/workflows/test-integrations-flags.yml b/.github/workflows/test-integrations-flags.yml index 6ee10d2154..dd87c1f998 100644 --- a/.github/workflows/test-integrations-flags.yml +++ b/.github/workflows/test-integrations-flags.yml @@ -28,12 +28,11 @@ jobs: changes: runs-on: ubuntu-22.04 outputs: - has_code_changes: ${{ github.event_name != 'pull_request' || steps.changes.outputs.has_code_changes }} + has_code_changes: ${{ steps.changes.outputs.has_code_changes }} steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes - if: github.event_name == 'pull_request' with: filters: | has_code_changes: diff --git a/.github/workflows/test-integrations-gevent.yml b/.github/workflows/test-integrations-gevent.yml index 63acdbd259..b9bf53dd56 100644 --- a/.github/workflows/test-integrations-gevent.yml +++ b/.github/workflows/test-integrations-gevent.yml @@ -28,12 +28,11 @@ jobs: changes: runs-on: ubuntu-22.04 outputs: - has_code_changes: ${{ github.event_name != 'pull_request' || steps.changes.outputs.has_code_changes }} + has_code_changes: ${{ steps.changes.outputs.has_code_changes }} steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes - if: github.event_name == 'pull_request' with: filters: | has_code_changes: diff --git a/.github/workflows/test-integrations-graphql.yml b/.github/workflows/test-integrations-graphql.yml index b665e273fc..4744e37cc6 100644 --- a/.github/workflows/test-integrations-graphql.yml +++ b/.github/workflows/test-integrations-graphql.yml @@ -28,12 +28,11 @@ jobs: changes: runs-on: ubuntu-22.04 outputs: - has_code_changes: ${{ github.event_name != 'pull_request' || steps.changes.outputs.has_code_changes }} + has_code_changes: ${{ steps.changes.outputs.has_code_changes }} steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes - if: github.event_name == 'pull_request' with: filters: | has_code_changes: diff --git a/.github/workflows/test-integrations-mcp.yml b/.github/workflows/test-integrations-mcp.yml index cc7e8df63a..f6198ee201 100644 --- a/.github/workflows/test-integrations-mcp.yml +++ b/.github/workflows/test-integrations-mcp.yml @@ -28,12 +28,11 @@ jobs: changes: runs-on: ubuntu-22.04 outputs: - has_code_changes: ${{ github.event_name != 'pull_request' || steps.changes.outputs.has_code_changes }} + has_code_changes: ${{ steps.changes.outputs.has_code_changes }} steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes - if: github.event_name == 'pull_request' with: filters: | has_code_changes: diff --git a/.github/workflows/test-integrations-misc.yml b/.github/workflows/test-integrations-misc.yml index bf81976f82..3909d88968 100644 --- a/.github/workflows/test-integrations-misc.yml +++ b/.github/workflows/test-integrations-misc.yml @@ -28,12 +28,11 @@ jobs: changes: runs-on: ubuntu-22.04 outputs: - has_code_changes: ${{ github.event_name != 'pull_request' || steps.changes.outputs.has_code_changes }} + has_code_changes: ${{ steps.changes.outputs.has_code_changes }} steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes - if: github.event_name == 'pull_request' with: filters: | has_code_changes: diff --git a/.github/workflows/test-integrations-network.yml b/.github/workflows/test-integrations-network.yml index 8aa806319e..85c94a22f9 100644 --- a/.github/workflows/test-integrations-network.yml +++ b/.github/workflows/test-integrations-network.yml @@ -28,12 +28,11 @@ jobs: changes: runs-on: ubuntu-22.04 outputs: - has_code_changes: ${{ github.event_name != 'pull_request' || steps.changes.outputs.has_code_changes }} + has_code_changes: ${{ steps.changes.outputs.has_code_changes }} steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes - if: github.event_name == 'pull_request' with: filters: | has_code_changes: diff --git a/.github/workflows/test-integrations-tasks.yml b/.github/workflows/test-integrations-tasks.yml index 9d95919091..3b6a0f6550 100644 --- a/.github/workflows/test-integrations-tasks.yml +++ b/.github/workflows/test-integrations-tasks.yml @@ -28,12 +28,11 @@ jobs: changes: runs-on: ubuntu-22.04 outputs: - has_code_changes: ${{ github.event_name != 'pull_request' || steps.changes.outputs.has_code_changes }} + has_code_changes: ${{ steps.changes.outputs.has_code_changes }} steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes - if: github.event_name == 'pull_request' with: filters: | has_code_changes: diff --git a/.github/workflows/test-integrations-web-1.yml b/.github/workflows/test-integrations-web-1.yml index 5f6836433b..221f08e7cc 100644 --- a/.github/workflows/test-integrations-web-1.yml +++ b/.github/workflows/test-integrations-web-1.yml @@ -28,12 +28,11 @@ jobs: changes: runs-on: ubuntu-22.04 outputs: - has_code_changes: ${{ github.event_name != 'pull_request' || steps.changes.outputs.has_code_changes }} + has_code_changes: ${{ steps.changes.outputs.has_code_changes }} steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes - if: github.event_name == 'pull_request' with: filters: | has_code_changes: diff --git a/.github/workflows/test-integrations-web-2.yml b/.github/workflows/test-integrations-web-2.yml index 11561cf7e5..1326577f02 100644 --- a/.github/workflows/test-integrations-web-2.yml +++ b/.github/workflows/test-integrations-web-2.yml @@ -28,12 +28,11 @@ jobs: changes: runs-on: ubuntu-22.04 outputs: - has_code_changes: ${{ github.event_name != 'pull_request' || steps.changes.outputs.has_code_changes }} + has_code_changes: ${{ steps.changes.outputs.has_code_changes }} steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes - if: github.event_name == 'pull_request' with: filters: | has_code_changes: diff --git a/scripts/split_tox_gh_actions/templates/base.jinja b/scripts/split_tox_gh_actions/templates/base.jinja index 460081d814..171acfa04e 100644 --- a/scripts/split_tox_gh_actions/templates/base.jinja +++ b/scripts/split_tox_gh_actions/templates/base.jinja @@ -36,12 +36,11 @@ jobs: changes: runs-on: ubuntu-22.04 outputs: - has_code_changes: {% raw %}${{ github.event_name != 'pull_request' || steps.changes.outputs.has_code_changes }}{% endraw %} + has_code_changes: {% raw %}${{ steps.changes.outputs.has_code_changes }}{% endraw %} steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes - if: {% raw %}github.event_name == 'pull_request'{% endraw %} with: filters: | has_code_changes: From 02cada156891dab262c2f867768694bcbcbfe9e9 Mon Sep 17 00:00:00 2001 From: Stephanie Anderson Date: Fri, 27 Mar 2026 09:06:04 +0100 Subject: [PATCH 4/5] ci: Handle cancelled state in gate job conditions Explicitly check for failure and cancelled states instead of excluding success and skipped. This fixes a bug where a cancelled changes job would let the gate pass silently. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/test-integrations-agents.yml | 4 ++-- .github/workflows/test-integrations-ai-workflow.yml | 4 ++-- .github/workflows/test-integrations-ai.yml | 4 ++-- .github/workflows/test-integrations-cloud.yml | 4 ++-- .github/workflows/test-integrations-common.yml | 4 ++-- .github/workflows/test-integrations-dbs.yml | 4 ++-- .github/workflows/test-integrations-flags.yml | 4 ++-- .github/workflows/test-integrations-gevent.yml | 4 ++-- .github/workflows/test-integrations-graphql.yml | 4 ++-- .github/workflows/test-integrations-mcp.yml | 4 ++-- .github/workflows/test-integrations-misc.yml | 4 ++-- .github/workflows/test-integrations-network.yml | 4 ++-- .github/workflows/test-integrations-tasks.yml | 4 ++-- .github/workflows/test-integrations-web-1.yml | 4 ++-- .github/workflows/test-integrations-web-2.yml | 4 ++-- scripts/split_tox_gh_actions/templates/check_required.jinja | 4 ++-- 16 files changed, 32 insertions(+), 32 deletions(-) diff --git a/.github/workflows/test-integrations-agents.yml b/.github/workflows/test-integrations-agents.yml index 1fe4ee685a..3019e3255b 100644 --- a/.github/workflows/test-integrations-agents.yml +++ b/.github/workflows/test-integrations-agents.yml @@ -112,7 +112,7 @@ jobs: steps: - name: Check for failures if: | - needs.changes.result == 'failure' || - (needs.test-agents.result != 'success' && needs.test-agents.result != 'skipped') + needs.changes.result == 'failure' || needs.changes.result == 'cancelled' || + needs.test-agents.result == 'failure' || needs.test-agents.result == 'cancelled' run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-ai-workflow.yml b/.github/workflows/test-integrations-ai-workflow.yml index fbe404969f..8b5540305f 100644 --- a/.github/workflows/test-integrations-ai-workflow.yml +++ b/.github/workflows/test-integrations-ai-workflow.yml @@ -116,7 +116,7 @@ jobs: steps: - name: Check for failures if: | - needs.changes.result == 'failure' || - (needs.test-ai_workflow.result != 'success' && needs.test-ai_workflow.result != 'skipped') + needs.changes.result == 'failure' || needs.changes.result == 'cancelled' || + needs.test-ai_workflow.result == 'failure' || needs.test-ai_workflow.result == 'cancelled' run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-ai.yml b/.github/workflows/test-integrations-ai.yml index 2110bdb60e..01b9261146 100644 --- a/.github/workflows/test-integrations-ai.yml +++ b/.github/workflows/test-integrations-ai.yml @@ -132,7 +132,7 @@ jobs: steps: - name: Check for failures if: | - needs.changes.result == 'failure' || - (needs.test-ai.result != 'success' && needs.test-ai.result != 'skipped') + needs.changes.result == 'failure' || needs.changes.result == 'cancelled' || + needs.test-ai.result == 'failure' || needs.test-ai.result == 'cancelled' run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-cloud.yml b/.github/workflows/test-integrations-cloud.yml index 574ea6651e..8324872919 100644 --- a/.github/workflows/test-integrations-cloud.yml +++ b/.github/workflows/test-integrations-cloud.yml @@ -128,7 +128,7 @@ jobs: steps: - name: Check for failures if: | - needs.changes.result == 'failure' || - (needs.test-cloud.result != 'success' && needs.test-cloud.result != 'skipped') + needs.changes.result == 'failure' || needs.changes.result == 'cancelled' || + needs.test-cloud.result == 'failure' || needs.test-cloud.result == 'cancelled' run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-common.yml b/.github/workflows/test-integrations-common.yml index 7d1b41fa7d..bd5aba091f 100644 --- a/.github/workflows/test-integrations-common.yml +++ b/.github/workflows/test-integrations-common.yml @@ -108,7 +108,7 @@ jobs: steps: - name: Check for failures if: | - needs.changes.result == 'failure' || - (needs.test-common.result != 'success' && needs.test-common.result != 'skipped') + needs.changes.result == 'failure' || needs.changes.result == 'cancelled' || + needs.test-common.result == 'failure' || needs.test-common.result == 'cancelled' run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-dbs.yml b/.github/workflows/test-integrations-dbs.yml index 5a403666c1..bea8329d2e 100644 --- a/.github/workflows/test-integrations-dbs.yml +++ b/.github/workflows/test-integrations-dbs.yml @@ -148,7 +148,7 @@ jobs: steps: - name: Check for failures if: | - needs.changes.result == 'failure' || - (needs.test-dbs.result != 'success' && needs.test-dbs.result != 'skipped') + needs.changes.result == 'failure' || needs.changes.result == 'cancelled' || + needs.test-dbs.result == 'failure' || needs.test-dbs.result == 'cancelled' run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-flags.yml b/.github/workflows/test-integrations-flags.yml index dd87c1f998..72981ac7f4 100644 --- a/.github/workflows/test-integrations-flags.yml +++ b/.github/workflows/test-integrations-flags.yml @@ -120,7 +120,7 @@ jobs: steps: - name: Check for failures if: | - needs.changes.result == 'failure' || - (needs.test-flags.result != 'success' && needs.test-flags.result != 'skipped') + needs.changes.result == 'failure' || needs.changes.result == 'cancelled' || + needs.test-flags.result == 'failure' || needs.test-flags.result == 'cancelled' run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-gevent.yml b/.github/workflows/test-integrations-gevent.yml index b9bf53dd56..59d3d2e9f0 100644 --- a/.github/workflows/test-integrations-gevent.yml +++ b/.github/workflows/test-integrations-gevent.yml @@ -108,7 +108,7 @@ jobs: steps: - name: Check for failures if: | - needs.changes.result == 'failure' || - (needs.test-gevent.result != 'success' && needs.test-gevent.result != 'skipped') + needs.changes.result == 'failure' || needs.changes.result == 'cancelled' || + needs.test-gevent.result == 'failure' || needs.test-gevent.result == 'cancelled' run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-graphql.yml b/.github/workflows/test-integrations-graphql.yml index 4744e37cc6..665e9236cd 100644 --- a/.github/workflows/test-integrations-graphql.yml +++ b/.github/workflows/test-integrations-graphql.yml @@ -120,7 +120,7 @@ jobs: steps: - name: Check for failures if: | - needs.changes.result == 'failure' || - (needs.test-graphql.result != 'success' && needs.test-graphql.result != 'skipped') + needs.changes.result == 'failure' || needs.changes.result == 'cancelled' || + needs.test-graphql.result == 'failure' || needs.test-graphql.result == 'cancelled' run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-mcp.yml b/.github/workflows/test-integrations-mcp.yml index f6198ee201..33ae20806e 100644 --- a/.github/workflows/test-integrations-mcp.yml +++ b/.github/workflows/test-integrations-mcp.yml @@ -112,7 +112,7 @@ jobs: steps: - name: Check for failures if: | - needs.changes.result == 'failure' || - (needs.test-mcp.result != 'success' && needs.test-mcp.result != 'skipped') + needs.changes.result == 'failure' || needs.changes.result == 'cancelled' || + needs.test-mcp.result == 'failure' || needs.test-mcp.result == 'cancelled' run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-misc.yml b/.github/workflows/test-integrations-misc.yml index 3909d88968..8a2fad4506 100644 --- a/.github/workflows/test-integrations-misc.yml +++ b/.github/workflows/test-integrations-misc.yml @@ -140,7 +140,7 @@ jobs: steps: - name: Check for failures if: | - needs.changes.result == 'failure' || - (needs.test-misc.result != 'success' && needs.test-misc.result != 'skipped') + needs.changes.result == 'failure' || needs.changes.result == 'cancelled' || + needs.test-misc.result == 'failure' || needs.test-misc.result == 'cancelled' run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-network.yml b/.github/workflows/test-integrations-network.yml index 85c94a22f9..d45e658e92 100644 --- a/.github/workflows/test-integrations-network.yml +++ b/.github/workflows/test-integrations-network.yml @@ -116,7 +116,7 @@ jobs: steps: - name: Check for failures if: | - needs.changes.result == 'failure' || - (needs.test-network.result != 'success' && needs.test-network.result != 'skipped') + needs.changes.result == 'failure' || needs.changes.result == 'cancelled' || + needs.test-network.result == 'failure' || needs.test-network.result == 'cancelled' run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-tasks.yml b/.github/workflows/test-integrations-tasks.yml index 3b6a0f6550..014737d502 100644 --- a/.github/workflows/test-integrations-tasks.yml +++ b/.github/workflows/test-integrations-tasks.yml @@ -143,7 +143,7 @@ jobs: steps: - name: Check for failures if: | - needs.changes.result == 'failure' || - (needs.test-tasks.result != 'success' && needs.test-tasks.result != 'skipped') + needs.changes.result == 'failure' || needs.changes.result == 'cancelled' || + needs.test-tasks.result == 'failure' || needs.test-tasks.result == 'cancelled' run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-web-1.yml b/.github/workflows/test-integrations-web-1.yml index 221f08e7cc..b569c6afcc 100644 --- a/.github/workflows/test-integrations-web-1.yml +++ b/.github/workflows/test-integrations-web-1.yml @@ -138,7 +138,7 @@ jobs: steps: - name: Check for failures if: | - needs.changes.result == 'failure' || - (needs.test-web_1.result != 'success' && needs.test-web_1.result != 'skipped') + needs.changes.result == 'failure' || needs.changes.result == 'cancelled' || + needs.test-web_1.result == 'failure' || needs.test-web_1.result == 'cancelled' run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/.github/workflows/test-integrations-web-2.yml b/.github/workflows/test-integrations-web-2.yml index 1326577f02..ff395bfb70 100644 --- a/.github/workflows/test-integrations-web-2.yml +++ b/.github/workflows/test-integrations-web-2.yml @@ -144,7 +144,7 @@ jobs: steps: - name: Check for failures if: | - needs.changes.result == 'failure' || - (needs.test-web_2.result != 'success' && needs.test-web_2.result != 'skipped') + needs.changes.result == 'failure' || needs.changes.result == 'cancelled' || + needs.test-web_2.result == 'failure' || needs.test-web_2.result == 'cancelled' run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 diff --git a/scripts/split_tox_gh_actions/templates/check_required.jinja b/scripts/split_tox_gh_actions/templates/check_required.jinja index a3b1bd4360..36bc5f2945 100644 --- a/scripts/split_tox_gh_actions/templates/check_required.jinja +++ b/scripts/split_tox_gh_actions/templates/check_required.jinja @@ -7,7 +7,7 @@ steps: - name: Check for failures if: | - needs.changes.result == 'failure' || - (needs.test-{{ lowercase_group }}.result != 'success' && needs.test-{{ lowercase_group }}.result != 'skipped') + needs.changes.result == 'failure' || needs.changes.result == 'cancelled' || + needs.test-{{ lowercase_group }}.result == 'failure' || needs.test-{{ lowercase_group }}.result == 'cancelled' run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1 From 0aea038f2fca772ab1f145d0a13eaaeaeb414f4c Mon Sep 17 00:00:00 2001 From: Stephanie Anderson Date: Fri, 27 Mar 2026 09:14:09 +0100 Subject: [PATCH 5/5] ci: Add gate job to ci.yml for required status checks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Same pattern as the test workflows — a gate job that always runs and explicitly checks for failure/cancelled states on all CI jobs. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/ci.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a74d65b7e3..81ad192330 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -110,3 +110,18 @@ jobs: path: | docs/_build/gh-pages.zip if-no-files-found: 'error' + + check_required_ci: + name: All CI checks passed + needs: [changes, lint, build_lambda_layer, docs] + if: always() + runs-on: ubuntu-22.04 + steps: + - name: Check for failures + if: | + needs.changes.result == 'failure' || needs.changes.result == 'cancelled' || + needs.lint.result == 'failure' || needs.lint.result == 'cancelled' || + needs.build_lambda_layer.result == 'failure' || needs.build_lambda_layer.result == 'cancelled' || + needs.docs.result == 'failure' || needs.docs.result == 'cancelled' + run: | + echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1