Skip to content

ci: Consolidate workflows#439

Merged
alexcrichton merged 2 commits intoalexcrichton:mainfrom
cgwalters:consolidate-required-checks
Mar 10, 2026
Merged

ci: Consolidate workflows#439
alexcrichton merged 2 commits intoalexcrichton:mainfrom
cgwalters:consolidate-required-checks

Conversation

@cgwalters
Copy link
Copy Markdown
Collaborator

Basically IMO a key best practice is to configure github repositories to:

  • Have required checks that gate merges
  • Enable auto-merging

But the problem with "required checks" is one gets into a "Catch-22" quickly when refactoring CI jobs when one wants to rename a test or equivalent. In this pattern there's a required-jobs job that itself depends on configuration of the CI flow.

This is what we do in https://github.com/bootc-dev/ repos.

Merge the separate main.yml and revdep.yml workflow files into a single
ci.yml. This makes it possible to configure a single 'required-checks'
sentinel job as the required status check in repository settings,
instead of having to enumerate each individual job.

While here, modernize the workflow:
- Update actions/checkout from @master to @v4
- Use dtolnay/rust-toolchain instead of manual rustup where possible
- Add concurrency settings to cancel in-progress runs on the same PR
- Add explicit permissions (contents: read, write override for docs)
- Add timeout-minutes to all jobs
- Add fail-fast: false to the test matrix

Assisted-by: OpenCode (Claude claude-opus-4-6)
Assisted-by: OpenCode (Claude claude-opus-4-6)
@cgwalters
Copy link
Copy Markdown
Collaborator Author

@alexcrichton once this lands can you configure a Github branch protection rule to gate merges on:

  • 1 reviewer approving
  • required-checks job passing

Also while we're here other good flags to set if they're not (I can't see):

  • Disallow force pushes
  • Immutable releases

@alexcrichton alexcrichton merged commit 6071cbe into alexcrichton:main Mar 10, 2026
11 checks passed
@alexcrichton
Copy link
Copy Markdown
Owner

Thanks! I've checked all the boxes except for requiring a reviewer approval since I don't feel like that's quite ready yet in this repo, but the CI gates I would hope would be sufficient for now. I've also checked a box saying that PRs are required to main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants