From 5a3c8c8da249ce82870de8f2faa07548c9475b8f Mon Sep 17 00:00:00 2001 From: Bjorn Neergaard Date: Sun, 24 Mar 2024 19:14:29 -0600 Subject: [PATCH] ci/tests: add workflow status job This job will wait until all other jobs in the workflow have finished, and serves as the point of truth for 'required checks.' This is a lot better than our current workflow, as it both accounts for skipped jobs/matrixes (which are considered successful), and obviates the need to change the branch configurations. --- .github/workflows/tests.yaml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index f3a74790b96..3107b0ee36f 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -54,8 +54,8 @@ jobs: lockfile: name: Check poetry.lock runs-on: ubuntu-latest - needs: changes if: needs.changes.outputs.project == 'true' + needs: changes steps: - uses: actions/checkout@v4 @@ -66,8 +66,8 @@ jobs: fixtures-pypi: name: Check fixtures (PyPI) runs-on: ubuntu-latest - needs: changes if: needs.changes.outputs.fixtures-pypi == 'true' + needs: changes steps: - uses: actions/checkout@v4 @@ -184,3 +184,16 @@ jobs: working-directory: ./poetry-plugin-export - run: git -C poetry-plugin-export diff --exit-code --stat HEAD + + status: + name: Status + runs-on: ubuntu-latest + if: always() + needs: + - lockfile + - fixtures-pypi + - mypy + - pytest + - pytest-export + steps: + - run: ${{ (contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')) && 'false' || 'true' }}