Skip to content

Commit

Permalink
ci: Add a meta job to simplify the project protection rules (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
theofidry authored Sep 17, 2023
1 parent 2021b4c commit dc7eac5
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/integrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -268,3 +268,29 @@ jobs:

- name: "Run E2E tests"
run: "./e2e/test-restricted-finders.sh"

# This is a "trick", a meta task which does not change, and we can use in
# the protected branch rules as opposed to the tests one above which
# may change regularly.
validate-tests:
name: "Tests status"
runs-on: "ubuntu-latest"
needs:
- "coding-standards"
- "auto-review"
- "tests"
- "legacy-tests"
- "infection"
- "e2e-ubuntu"
- "e2e-osx"
- "e2e-windows"
- "e2e-ubuntu-restricted"
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 dc7eac5

Please sign in to comment.