From 18644e9f7eb30ef75104e7ab3fbffae1795f87a2 Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Mon, 12 Aug 2024 14:23:41 +0200 Subject: [PATCH] properly fail the "Test Suite" check when any inputs are failing --- .github/workflows/basic.yml | 7 +++++-- .github/workflows/beaker.yml | 8 +++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml index b563f5e..96b9a56 100644 --- a/.github/workflows/basic.yml +++ b/.github/workflows/basic.yml @@ -101,9 +101,12 @@ jobs: run: bundle exec rake parallel_spec tests: + if: always() needs: unit runs-on: ubuntu-24.04 name: Test suite steps: - - run: echo Test suite completed - working-directory: '.' + - name: Decide whether the needed jobs succeeded or failed + uses: re-actors/alls-green@release/v1 + with: + jobs: ${{ toJSON(needs) }} diff --git a/.github/workflows/beaker.yml b/.github/workflows/beaker.yml index 1dbd6f3..000f258 100644 --- a/.github/workflows/beaker.yml +++ b/.github/workflows/beaker.yml @@ -181,12 +181,14 @@ jobs: env: ${{ matrix.env }} tests: + if: always() needs: - unit - acceptance runs-on: ubuntu-24.04 name: Test suite steps: - - run: echo Test suite completed - # explicitly run at the root dir. In case people set working-directory this will otherwise fail (because this jobs doesn't clone the repo and the subdir doesn't exist) - working-directory: '.' + - name: Decide whether the needed jobs succeeded or failed + uses: re-actors/alls-green@release/v1 + with: + jobs: ${{ toJSON(needs) }}