From 090f3d994e0313c78273588ebbb495cca073ef14 Mon Sep 17 00:00:00 2001 From: Daniel Szoke Date: Thu, 17 Jul 2025 14:37:44 +0200 Subject: [PATCH] ci: Check strictly for success Previously, some statuses other than success (e.g. cancelled) were considered passing for the `check_required_tests` job. We can instead check directly against the `success` status, to strictly enforce that all tests must pass. --- .github/workflows/test-integrations-ai.yml | 2 +- .github/workflows/test-integrations-cloud.yml | 2 +- .github/workflows/test-integrations-common.yml | 2 +- .github/workflows/test-integrations-dbs.yml | 2 +- .github/workflows/test-integrations-flags.yml | 2 +- .github/workflows/test-integrations-gevent.yml | 2 +- .github/workflows/test-integrations-graphql.yml | 2 +- .github/workflows/test-integrations-misc.yml | 2 +- .github/workflows/test-integrations-network.yml | 2 +- .github/workflows/test-integrations-tasks.yml | 2 +- .github/workflows/test-integrations-web-1.yml | 2 +- .github/workflows/test-integrations-web-2.yml | 2 +- scripts/split_tox_gh_actions/templates/check_required.jinja | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test-integrations-ai.yml b/.github/workflows/test-integrations-ai.yml index e81d507d27..2777810a8f 100644 --- a/.github/workflows/test-integrations-ai.yml +++ b/.github/workflows/test-integrations-ai.yml @@ -188,6 +188,6 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Check for failures - if: contains(needs.test-ai-pinned.result, 'failure') || contains(needs.test-ai-pinned.result, 'skipped') + if: needs.test-ai-pinned.result != 'success' 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 114e904d4b..6a9b9df0de 100644 --- a/.github/workflows/test-integrations-cloud.yml +++ b/.github/workflows/test-integrations-cloud.yml @@ -188,6 +188,6 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Check for failures - if: contains(needs.test-cloud-pinned.result, 'failure') || contains(needs.test-cloud-pinned.result, 'skipped') + if: needs.test-cloud-pinned.result != 'success' 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 2ac8d827fa..2ceb23b79c 100644 --- a/.github/workflows/test-integrations-common.yml +++ b/.github/workflows/test-integrations-common.yml @@ -89,6 +89,6 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Check for failures - if: contains(needs.test-common-pinned.result, 'failure') || contains(needs.test-common-pinned.result, 'skipped') + if: needs.test-common-pinned.result != 'success' 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 460ffe1ad5..1ad39421d6 100644 --- a/.github/workflows/test-integrations-dbs.yml +++ b/.github/workflows/test-integrations-dbs.yml @@ -228,6 +228,6 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Check for failures - if: contains(needs.test-dbs-pinned.result, 'failure') || contains(needs.test-dbs-pinned.result, 'skipped') + if: needs.test-dbs-pinned.result != 'success' 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 0e2c9ef166..d6da6c8acd 100644 --- a/.github/workflows/test-integrations-flags.yml +++ b/.github/workflows/test-integrations-flags.yml @@ -101,6 +101,6 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Check for failures - if: contains(needs.test-flags-pinned.result, 'failure') || contains(needs.test-flags-pinned.result, 'skipped') + if: needs.test-flags-pinned.result != 'success' 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 3e0903e2c5..c0bd099e45 100644 --- a/.github/workflows/test-integrations-gevent.yml +++ b/.github/workflows/test-integrations-gevent.yml @@ -89,6 +89,6 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Check for failures - if: contains(needs.test-gevent-pinned.result, 'failure') || contains(needs.test-gevent-pinned.result, 'skipped') + if: needs.test-gevent-pinned.result != 'success' 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 51ae8a8a81..e851dfc9bb 100644 --- a/.github/workflows/test-integrations-graphql.yml +++ b/.github/workflows/test-integrations-graphql.yml @@ -101,6 +101,6 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Check for failures - if: contains(needs.test-graphql-pinned.result, 'failure') || contains(needs.test-graphql-pinned.result, 'skipped') + if: needs.test-graphql-pinned.result != 'success' 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 05a8aaeda1..8a2e87c9ca 100644 --- a/.github/workflows/test-integrations-misc.yml +++ b/.github/workflows/test-integrations-misc.yml @@ -109,6 +109,6 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Check for failures - if: contains(needs.test-misc-pinned.result, 'failure') || contains(needs.test-misc-pinned.result, 'skipped') + if: needs.test-misc-pinned.result != 'success' 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 769a95c08a..47ae674934 100644 --- a/.github/workflows/test-integrations-network.yml +++ b/.github/workflows/test-integrations-network.yml @@ -164,6 +164,6 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Check for failures - if: contains(needs.test-network-pinned.result, 'failure') || contains(needs.test-network-pinned.result, 'skipped') + if: needs.test-network-pinned.result != 'success' 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 91b47f90c6..6b3fcab41f 100644 --- a/.github/workflows/test-integrations-tasks.yml +++ b/.github/workflows/test-integrations-tasks.yml @@ -218,6 +218,6 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Check for failures - if: contains(needs.test-tasks-pinned.result, 'failure') || contains(needs.test-tasks-pinned.result, 'skipped') + if: needs.test-tasks-pinned.result != 'success' 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 67669c729b..3b48472d5e 100644 --- a/.github/workflows/test-integrations-web-1.yml +++ b/.github/workflows/test-integrations-web-1.yml @@ -119,6 +119,6 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Check for failures - if: contains(needs.test-web_1-pinned.result, 'failure') || contains(needs.test-web_1-pinned.result, 'skipped') + if: needs.test-web_1-pinned.result != 'success' 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 c0438dc924..b98e5f02fc 100644 --- a/.github/workflows/test-integrations-web-2.yml +++ b/.github/workflows/test-integrations-web-2.yml @@ -220,6 +220,6 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Check for failures - if: contains(needs.test-web_2-pinned.result, 'failure') || contains(needs.test-web_2-pinned.result, 'skipped') + if: needs.test-web_2-pinned.result != 'success' 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 a2ca2db26e..9a2bbed830 100644 --- a/scripts/split_tox_gh_actions/templates/check_required.jinja +++ b/scripts/split_tox_gh_actions/templates/check_required.jinja @@ -8,6 +8,6 @@ runs-on: ubuntu-22.04 steps: - name: Check for failures - if: contains(needs.test-{{ lowercase_group }}-pinned.result, 'failure') || contains(needs.test-{{ lowercase_group }}-pinned.result, 'skipped') + if: needs.test-{{ lowercase_group }}-pinned.result != 'success' run: | echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1