Conversation
The unit (macos-latest) job was taking 6-18 minutes because it ran much more than just unit tests. This splits the job: - **unit (macos-latest)**: Now only runs `cargo test --all-features` - Timeout reduced from 30 to 15 minutes - Only depends on build-macos - **lint (ubuntu-latest)**: New job for all lint/check tasks - cargo deny, msrv, machete - mise run lint - cargo clippy (both variants) - test-standalone.sh - Runs on faster Ubuntu runner with mold linker Cache strategy optimized: - All jobs share `shared-key: build` - Only lint job saves cache (on main branch) - Other jobs use save-if: false (read-only) Expected results: - unit: ~2-6 min (down from 6-18) - lint: ~5-8 min (runs in parallel) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR refactors the CI workflow to improve performance by splitting the slow macOS unit test job into two parallel jobs. The unit (macos-latest) job now only runs unit tests, while a new lint (ubuntu-latest) job handles all linting, formatting, and verification tasks on a faster Ubuntu runner.
Key Changes:
- Split the monolithic
unit (macos-latest)job into focusedunit(tests only) andlint(all checks) jobs - Optimized cache strategy with shared
buildkey and conditional saving only on main branch for thelintjob - Reduced
unitjob timeout from 30 to 15 minutes and removed unnecessary dependencies
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.github/workflows/test.yml
Outdated
| timeout-minutes: 15 | ||
| needs: [build-macos] |
There was a problem hiding this comment.
The unit job now only depends on build-macos, but it previously depended on both build-ubuntu and build-macos. Since the new lint job performs tasks that may validate cross-platform compatibility, consider whether removing the build-ubuntu dependency could miss issues that would be caught by having both builds complete first.
| - run: mise x wait-for-gh-rate-limit -- wait-for-gh-rate-limit | ||
| - run: mise install | ||
| - run: mise x -- bun i | ||
| - run: mise x -- cargo test --all-features |
There was a problem hiding this comment.
The unit job no longer installs bun (removed mise x -- bun i step), but still runs tests with --all-features. If any tests depend on bun-installed dependencies or JavaScript tooling, those tests may fail or be skipped silently. Verify that no tests require the bun installation step.
Add a `ci` job that runs after all other jobs and checks that they all succeeded. This simplifies branch protection rules - only need to require the `ci` job instead of listing all individual jobs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The macOS cache was never being saved because: - build-macos had save-if: false - unit (macos) had save-if: false - lint saves but runs on Ubuntu (separate cache key) Fix by having build-macos save the cache on main branch. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The build-macos job was redundant - unit was just downloading the artifact to run tests. Now unit builds and tests directly, which: - Removes an unnecessary job - Lets unit start immediately (no waiting for build-macos) - Simplifies the workflow unit job now: - Builds mise with cargo build --all-features - Saves cache on main branch - Runs mise install and cargo test 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Hyperfine Performance
|
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2025.12.11 x -- echo |
20.8 ± 0.5 | 19.8 | 24.4 | 1.00 |
mise x -- echo |
21.4 ± 0.8 | 20.1 | 24.2 | 1.03 ± 0.05 |
mise env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2025.12.11 env |
20.4 ± 0.8 | 19.3 | 27.1 | 1.00 |
mise env |
21.0 ± 0.8 | 19.5 | 26.9 | 1.03 ± 0.06 |
mise hook-env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2025.12.11 hook-env |
20.6 ± 0.8 | 19.3 | 24.9 | 1.00 |
mise hook-env |
21.1 ± 0.9 | 19.7 | 25.0 | 1.03 ± 0.06 |
mise ls
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2025.12.11 ls |
18.4 ± 0.8 | 17.0 | 24.2 | 1.00 |
mise ls |
18.7 ± 0.8 | 17.4 | 21.9 | 1.02 ± 0.06 |
xtasks/test/perf
| Command | mise-2025.12.11 | mise | Variance |
|---|---|---|---|
| install (cached) | 113ms | 116ms | -2% |
| ls (cached) | 70ms | 68ms | +2% |
| bin-paths (cached) | 75ms | 76ms | -1% |
| task-ls (cached) | 4250ms | ✅ 294ms | +1345% |
✅ Performance improvement: task-ls cached is 1345%
* upstream/renovate/lockfile-maintenance: chore(deps): lock file maintenance fix(ci): improve GHA cache efficiency and fix registry-ci bug (jdx#7404) feat(tera): add haiku() function for random name generation (jdx#7399) feat: implement independent versioning for subcrates (jdx#7402) docs: add comprehensive glossary (jdx#7401) docs: improve installation documentation (jdx#7403) test: add token pool integration for rate limit distribution (jdx#7397) docs: add link to COPR package page for Fedora/RHEL test: rename duplicate 'ci' job names for clarity (jdx#7398) registry: add github backend for swiftformat (jdx#7396) chore: rename mise-tools to mise-versions chore: release 2025.12.12 (jdx#7386) fix(github): use version_prefix when fetching release for SLSA verification (jdx#7391) refactor(vfox): remove submodules, embed plugins directly (jdx#7389) test(registry): add final ci job as merge gate (jdx#7390) test: split unit job to speed up macOS CI (jdx#7388) feat(backend): add security features to github backend (jdx#7387)
Summary
The
unit (macos-latest)job was taking 6-18 minutes because it ran much more than just unit tests. This PR splits the job to improve CI performance:unit (macos-latest): Now only runs
cargo test --all-featuresbuild-macoslint (ubuntu-latest): New job for all lint/check tasks
cargo deny check,cargo msrv verify,cargo machetemise run lint(actionlint, cargo-fmt, hk, markdownlint, ripgrep, schema)cargo clippy(both variants)./scripts/test-standalone.shCache Strategy
All jobs share
shared-key: buildto minimize storage:lintjob saves cache (on main branch viasave-if: ${{ github.ref == 'refs/heads/main' }})build-ubuntu,build-macos, andunitusesave-if: false(read-only)Expected Results
Both jobs run in parallel after their respective build jobs, reducing overall wall clock time.
Test plan
unitjob only runs cargo testlintjob runs all lint tasks🤖 Generated with Claude Code
Note
Split heavy lint/checks into a new
lintjob on Ubuntu, simplifiedunit(macOS) to just run tests, removedbuild-macos, adjusted caching/artifacts, and added aciaggregation job to enforce all-job success..github/workflows/test.yml):build-macos.unit(macOS) to only build and runcargo test --all-features(drops lint/tools setup and artifact download).lint(Ubuntu) running checks:cargo-deny,cargo-msrv,cargo-machete,./scripts/test-standalone.sh,mise run lint,cargo clippy(both), withsetup-moldandbun i.ciaggregator job to fail if any required jobs (build-ubuntu,build-windows,unit,nightly,lint,coverage,windows-unit,windows-e2e) do not succeed.build; setsave-if: falseforbuild-ubuntu; conditionalsave-ifonmainforunit/lint.lintdownloadsmise-ubuntu-latestartifact;unitnow builds locally instead of downloading artifacts.mise installusage and addwait-for-gh-rate-limitwhere used.Written by Cursor Bugbot for commit ca0b517. This will update automatically on new commits. Configure here.