Skip to content

Commit

Permalink
Add an all-checks capstone shard to CI
Browse files Browse the repository at this point in the history
https://github.com/re-actors/alls-green

One shard requires that all the others are green or skipped.  This single shard can be added as a required check in GitHub's branch protection rules, then never touched again.  When adding a new shard to the workflow, you just add its name to the "needs" list and you're done.

And yes, it supports matrix strategies without needing to maintain a list of all the permutations.
  • Loading branch information
RBusarow committed Nov 2, 2023
1 parent 0ee0ccb commit 26bf28f
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ jobs :
name : test-results-${{ matrix.kotlin-version }}
path : ./**/build/reports/tests/


test-windows :
runs-on : windows-latest
timeout-minutes : 25
Expand Down Expand Up @@ -274,3 +273,26 @@ jobs :

- name : "Build Benchmark Project"
run : ./gradlew :benchmark:app:assemble

all-checks:
if: always()
runs-on: ubuntu-latest
needs:
- test-ubuntu
- test-windows
- ktlint
- lint
- publish-maven-local
- publish-snapshot
- test-gradle-plugin
- kapt-for-dagger-factories
- instrumentation-tests
- gradle-wrapper-validation
- build-benchmark-project

steps:
- name: require that all other jobs have passed
uses: re-actors/alls-green@release/v1
with:
allowed-skips: publish-snapshot
jobs: ${{ toJSON(needs) }}

0 comments on commit 26bf28f

Please sign in to comment.