Skip to content

Commit

Permalink
ci/tests: add workflow status job
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
neersighted committed Mar 25, 2024
1 parent 886735a commit 86b50fe
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down Expand Up @@ -184,3 +184,17 @@ 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:
- if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
run: exit 1

0 comments on commit 86b50fe

Please sign in to comment.