Skip to content

Commit

Permalink
ci: Add meta job (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
theofidry authored Dec 3, 2023
1 parent 915b85e commit bcbde2c
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,22 @@ jobs:
- name: Run tests
run: vendor/bin/phpunit --verbose --stop-on-failure

# This is a "trick", a meta task which does not change, and we can use in
# the protected branch rules as opposed to the individual tests which
# may change regularly.
validate-tests:
name: Tests status
runs-on: ubuntu-latest
needs:
- php-cs-fixer
- phpunit
if: always()
steps:
- name: Successful run
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0

- name: Failing run
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1

0 comments on commit bcbde2c

Please sign in to comment.