Repository navigation
Avoid repeated CLI startup when preparing integration fixtures - #917
Merged
Merged
Conversation
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.
Prepare installed hooks through
Overcommit::Installerwhen installation is only integration-test setup. This avoids repeatedly starting Ruby and loading the CLI before exercising a commit, push, signing, merge, or concurrency behavior. Dedicated CLI/installation and Gemfile-loading tests retain their real executable calls; every example and assertion remains.The helper clears repository-path caches before and after installation so setup cannot inherit a previous example's repository or leak its own paths. Fixture logging is captured in memory.
Paired Windows CI experiment on Ruby 3.4 compared unchanged code and this setup on the same VM, alternating order across all five production shards:
All five candidates passed and were faster in both execution orders: median paired reduction 10.5%, aggregate test-command reduction 9.7%.
Local validation: all 90 integration examples pass, RuboCop passes, and
git diff --checkpasses. Full GitHub CI passed all 10,188 example executions across the six Ruby/OS pairs, lint, and required CI in 107s. This verifies correctness; overall workflow time was approximately unchanged within hosted-runner variation.