From 67cca2cde40c48d85931058841cf63d8ed8d5fd8 Mon Sep 17 00:00:00 2001 From: Tom Herman Date: Mon, 11 Dec 2023 18:50:12 +0200 Subject: [PATCH] add deploy-status "test", designed for a branch protection rule --- .github/workflows/tests.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0285e74..6fc69c3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -47,3 +47,16 @@ jobs: uses: pmeier/pytest-results-action@main with: path: ./*-test-results.xml + + # This allows us to have a branch protection rule this entire workflow + deploy-status: + runs-on: ubuntu-latest + needs: [ test_py_os_variations, test_full ] + if: always() + steps: + - name: Successful deploy + if: ${{ !(contains(needs.*.result, 'failure')) }} + run: exit 0 + - name: Failing deploy + if: ${{ contains(needs.*.result, 'failure') }} + run: exit 1