Repository navigation
ci: speed up the tests on Windows - #227
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #227 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 50 50
Lines 2863 2874 +11
=========================================
+ Hits 2863 2874 +11
|
thorsten-klein
force-pushed
the
ci/windows-test-speed
branch
from
November 14, 2026 07:44
dea1a84 to
f7317d5
Compare
The tests start many git processes and write many small files. Defender scans each one.
Each test copies them. It no longer builds them again. The fixtures also make fewer git calls. This makes the tests much faster on Windows, where each git call is slow.
- Check ref names in Python instead of with git check-ref-format. - Ask for the git version only once per git binary. - Ask for --git-dir and --is-inside-work-tree in one call. - Ask for the worktree suffix only once per command.
main still tests all Python versions.
The test repos in tmp_path then live on a fast ReFS drive.
thorsten-klein
force-pushed
the
ci/windows-test-speed
branch
from
November 14, 2026 07:47
b162b30 to
1994aa5
Compare
|
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.



Windows test jobs took 13–20 min. Linux took about 2 min.
The tests start many git processes. On Windows each one costs about 46 ms.
mainstill tests all versions. The ruleset formainnow requires only these checks.Git calls in a full local test run: 54.8k before, 39.5k after.