From 301cd4feb762697f75b2e70e38f2bc9622f5f9c1 Mon Sep 17 00:00:00 2001 From: Tom Herman Date: Sat, 11 Jan 2025 12:43:02 +0200 Subject: [PATCH] add deploy-status --- .github/workflows/tests.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2a81ffe..f69e3b8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,7 +9,7 @@ on: - main jobs: - test_full: + test_programs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -28,4 +28,17 @@ jobs: if: always() uses: pmeier/pytest-results-action@main with: - path: ./*-test-results.xml \ No newline at end of file + path: ./*-test-results.xml + + # This allows us to have a branch protection rule this entire workflow + deploy-status: + runs-on: ubuntu-latest + needs: [ test_programs ] + 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