Skip to content

Commit

Permalink
ci: Update the meta-jobs (#857)
Browse files Browse the repository at this point in the history
  • Loading branch information
theofidry authored Oct 14, 2023
1 parent 8b8b795 commit a0d4a55
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 8 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/composer-root-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
- name: Lint CS
run: cd composer-root-version-checker; make cs_lint

tests:
composer-root-version:
runs-on: ubuntu-latest
name: Tests
strategy:
Expand Down Expand Up @@ -86,9 +86,11 @@ jobs:
# the protected branch rules as opposed to the tests one above which
# may change regularly.
validate-tests:
name: Tests status
name: RootVersionChecker Status
runs-on: ubuntu-latest
needs: tests
needs:
- cs-lint
- composer-root-version
if: always()
steps:
- name: Successful run
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/e2e-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,12 @@ jobs:
# may change regularly.
# This allows us to mark only this job as required instead of each individual
# ever-changing E2E tests.
validate-e2e:
name: Check status
validate-tests:
name: End-to-End Tests Status
runs-on: ubuntu-latest
needs: e2e-tests
needs:
- build-test-phar
- e2e-tests
if: always()
steps:
- name: Successful run
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,25 @@ jobs:
run: make phpstan_install

- run: make phpstan

# This is a "trick", a meta task which does not change, and we can use in
# the protected branch rules as opposed to the E2E tests one above which
# may change regularly.
# This allows us to mark only this job as required instead of each individual
# ever-changing E2E tests.
validate-tests:
name: Lint Status
runs-on: ubuntu-latest
needs:
- cs
- phpstan
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

7 changes: 5 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,12 @@ jobs:
# the protected branch rules as opposed to the tests one above which
# may change regularly.
validate-tests:
name: Unit tests status
name: Unit tests Status
runs-on: ubuntu-latest
needs: unit-tests
needs:
- root-version
- composer-json
- unit-tests
if: always()
steps:
- name: Successful run
Expand Down

0 comments on commit a0d4a55

Please sign in to comment.