Run the root checks as parallel steps in one job - #678
Merged
Conversation
Each root check had a job of its own through the generic mise-task.yaml wrapper, which was the only way to run them concurrently. Measured over six successful runs on main, those eight jobs spent about 103s restoring the same tools to run 5s of checks: a job is a fresh VM, so the same image boot, checkout and cache restore was paid eight times over. GitHub Actions gained parallel steps on 2026-06-25, which run concurrently inside one job while still reporting per-step status. Move the eight checks into a single job, so the setup is paid once. A failing step is still attributed individually, and its siblings still run, so nothing is lost by no longer having a job per check. ruff keeps its cache in the working directory, so check:ruff and check:ruff:format would now share one .ruff_cache. Point them at separate cache directories under the runner temp instead.
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
It changes CI execution semantics and relies on a relatively new GitHub Actions feature (“parallel” steps) that should be validated in real runs to ensure expected check reporting and stability.
Pull request overview
This PR optimizes CI runtime by consolidating the repository-root “mise tool” checks into a single reusable workflow job that runs those checks concurrently via GitHub Actions’ parallel steps, reducing repeated VM setup/checkout/cache restore overhead.
Changes:
- Replaced eight separate root-check jobs in
ci.yamlwith a singlechecks-misejob that calls a reusable workflow. - Added
.github/workflows/checks-mise.yamlto run the root checks as parallel steps inside one job. - Split Ruff cache directories between
check:ruffandcheck:ruff:formatto avoid sharing a.ruff_cachewhen running concurrently.
File summaries
| File | Description |
|---|---|
| .github/workflows/ci.yaml | Collapses multiple root-check jobs into a single reusable-workflow job (checks-mise) and updates the final “alls-green” aggregator dependencies accordingly. |
| .github/workflows/checks-mise.yaml | New reusable workflow that restores mise tools once, then runs the root checks concurrently using parallel, with separate Ruff cache dirs. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Each root check had a job of its own through the generic mise-task.yaml wrapper, which was the only way to run them concurrently. Measured over six successful runs on main, those eight jobs spent about 103s restoring the same tools to run 5s of checks: a job is a fresh VM, so the same image boot, checkout and cache restore was paid eight times over.
GitHub Actions gained parallel steps on 2026-06-25, which run concurrently inside one job while still reporting per-step status. Move the eight checks into a single job, so the setup is paid once. A failing step is still attributed individually, and its siblings still run, so nothing is lost by no longer having a job per check.
ruff keeps its cache in the working directory, so check:ruff and check:ruff:format would now share one .ruff_cache. Point them at separate cache directories under the runner temp instead.