From b92fde37cee08ac018f17f41913f2cf9d98d0fe4 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sat, 24 Sep 2022 23:36:50 +0200 Subject: [PATCH 1/2] Introduce a gate/check GHA job MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This adds a GHA job that reliably determines if all the required dependencies have succeeded or not. It also allows to reduce the list of required branch protection CI statuses to just one — `check`. This reduces the maintenance burden by a lot and have been battle-tested across a small bunch of projects in its action form and in-house implementations of other people. I was curious about the spread of use. And I've just discovered that it is now in use in aiohttp (and other aio-libs projects), CherryPy, some of the Ansible repositories, all of the jaraco's projects (like `setuptools`, `importlib_metadata`), some PyCQA, PyCA and pytest projects, a few AWS Labs projects. Admittedly, I maintain a few of these but it seems to address some of the pain folks have: https://github.com/jaraco/skeleton/pull/55#issuecomment-1106638475. The story behind this is explained in more detail at https://github.com/marketplace/actions/alls-green#why. --- .github/workflows/test.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5f5832475d3..80e747400e3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -211,3 +211,17 @@ jobs: fail_ci_if_error: true files: ./coverage.xml verbose: true + + check: # This job does nothing and is only used for the branch protection + if: always() + + needs: + - build + + runs-on: ubuntu-latest + + steps: + - name: Decide whether the needed jobs succeeded or failed + uses: re-actors/alls-green@release/v1 + with: + jobs: ${{ toJSON(needs) }} From 30ce631fb9f306e81d70de03d2328162a8717933 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sat, 24 Sep 2022 23:39:20 +0200 Subject: [PATCH 2/2] Securely pin re-actors/alls-green to v1.2 commit --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 80e747400e3..9e646e53ab4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -222,6 +222,6 @@ jobs: steps: - name: Decide whether the needed jobs succeeded or failed - uses: re-actors/alls-green@release/v1 + uses: re-actors/alls-green@198badcb65a1a44528f27d5da555c4be9f12eac6 with: jobs: ${{ toJSON(needs) }}