Skip to content

Commit

Permalink
chore(ci): make all pull.yml jobs required in branch protection autom…
Browse files Browse the repository at this point in the history
…atically (#554)

As is the case for many suites of GitHub actions, it's a huge pain to manually maintain the list of required checks in the branch protection. This change leverages https://github.com/re-actors/alls-green to add a single capstone action that only passes if all dependent jobs pass (see repo README for details on why the naive approach doesn't work).

Once this is approved I'll update the required checks before merging.

Also adding Python tests to the list of triggers in the nightly build since I noticed it was missing.
  • Loading branch information
robin-aws authored Sep 3, 2024
1 parent dfca8d9 commit 17425b1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/nightly_dafny.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
dafny-nightly-java,
dafny-nightly-net,
dafny-nightly-rust,
dafny-nightly-python,
]
if: ${{ always() && contains(needs.*.result, 'failure') }}
env:
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,18 @@ jobs:
uses: ./.github/workflows/test_models_python_tests.yml
with:
dafny: ${{ matrix.dafny-version }}

pr-ci-all-required:
if: always()
needs:
- pr-ci-verification
- pr-ci-java
- pr-ci-net
- pr-ci-rust
- pr-ci-python
runs-on: ubuntu-latest
steps:
- name: Verify all required jobs passed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}

0 comments on commit 17425b1

Please sign in to comment.