ci: optimize test workflow to reduce CI runtime#180
Merged
Conversation
- Remove `cargo build --release` from lint job (fmt, clippy, and unit tests only need debug builds) - Move single binary architecture verification to integration-tests where the release build already happens - Merge homebrew-simulation job into integration-tests(macos) using conditional steps, eliminating a redundant macOS release build - Replace manual actions/cache with Swatinem/rust-cache@v2 for smarter Rust-specific caching with automatic target pruning Reduces total job count from 5 to 4 and eliminates two redundant `cargo build --release` invocations. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
lintjob (formerlyunit-tests) only runscargo fmt --check,cargo clippy, andcargo test --lib— none of which need--release. Thecargo build --releaseand single binary architecture verification have been moved tointegration-tests, where the release build already happens.homebrew-simulationintointegration-tests(macos): Both jobs ran onmacos-latestand built the same release binary. The Homebrew simulation steps are now conditional (if: matrix.os == 'macos-latest') withinintegration-tests, eliminating a redundant macOS release build.actions/cachewithSwatinem/rust-cache@v2: Purpose-built for Rust projects — automatically handles cache key derivation, target directory pruning, and per-job cache isolation.Before: 5 parallel jobs (unit-tests, integration-ubuntu, integration-macos, homebrew-sim, xtask-test)
After: 4 parallel jobs (lint, integration-ubuntu, integration-macos, xtask-test)
Net effect: 2 fewer
cargo build --releaseinvocations (lint job drops release build entirely, homebrew-sim merged into integration-macos), and smarter caching across all jobs.Test plan
lintjob passes (fmt, clippy, unit tests) without release buildintegration-tests (ubuntu)passes with binary architecture checkintegration-tests (macos)passes with Homebrew simulation stepsxtask-testpasses with new caching🤖 Generated with Claude Code