ci: run the test suite on windows-latest (fork verification) - #2
Open
JamBalaya56562 wants to merge 1 commit into
Open
ci: run the test suite on windows-latest (fork verification)#2JamBalaya56562 wants to merge 1 commit into
JamBalaya56562 wants to merge 1 commit into
Conversation
Reviewer's GuideAdds a Windows CI job that builds and runs tests with appropriate shell and line-ending configuration, while relaxing a shell-completion test guard so missing POSIX shells on non-Unix runners (like Windows) don’t cause CI panics. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The hardcoded
USAGE_SHELL_BASHpath toC:\Program Files\Git\bin\bash.exemay be brittle if the Windows image changes; consider resolving the Git Bash path dynamically (e.g., viawhere bashor a small helper) and exporting that instead. - The
cfg!(unix)guard inskip_if_shell_missingassumes that only Unix CI runners will have zsh/fish installed; if you ever add macOS or other non-Linux Unix runners, verify that this behavior is still correct or make the check explicitly tied to the shells/runners where installation is expected.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The hardcoded `USAGE_SHELL_BASH` path to `C:\Program Files\Git\bin\bash.exe` may be brittle if the Windows image changes; consider resolving the Git Bash path dynamically (e.g., via `where bash` or a small helper) and exporting that instead.
- The `cfg!(unix)` guard in `skip_if_shell_missing` assumes that only Unix CI runners will have zsh/fish installed; if you ever add macOS or other non-Linux Unix runners, verify that this behavior is still correct or make the check explicitly tied to the shells/runners where installation is expected.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
JamBalaya56562
force-pushed
the
windows-ci
branch
6 times, most recently
from
August 9, 2026 07:37
1915875 to
49dfd23
Compare
usage is used on Windows and released for it, but nothing has been testing it there. jdx#771 made the suite runnable on the platform; this runs it. Build and test only. `render` asserts a clean git diff, which line endings and the checked-in symlinks make unreliable, and `lint` is a property of the source rather than of the platform — the Linux job already covers both. mise's Windows jobs are shaped the same way. Two settings the job needs, both measured on a runner rather than assumed: `core.autocrlf false`, set before checkout. git defaults it to true on Windows and the repo has no .gitattributes, so fixtures and expected output arrive with CRLF. Seven help tests in lib/tests/parse.rs and two in cli/tests/markdown.rs fail on it, and the failure is near-unreadable: pretty_assertions prints both sides as identical, because the only difference is invisible. `USAGE_SHELL_BASH`, because the image carries System32's bash.exe — the WSL launcher, with no distribution installed. `where bash` lists Git Bash first and CreateProcess still reaches System32, since it searches the system directory before PATH. Without the variable `usage bash` exits 1 with "Windows Subsystem for Linux has no installed distributions". This is the case USAGE_SHELL_BASH was added for in jdx#767, and the runner turns out to be an example of it. zsh and fish are not installed, and are not worth installing: nothing on Windows ships them, and the completion tests skip a shell they cannot run. So the `CI` rule in `skip_if_shell_missing` — which refuses to skip, on the grounds that a missing shell on a runner that installs one is a configuration bug — now applies on Unix only. Only the Linux job installs shells, so only there is absence a bug. mise draws the same line, installing no POSIX shells on Windows at all. Measured on windows-latest: 538 passed, 0 failed, 0 skipped.
JamBalaya56562
force-pushed
the
windows-ci
branch
from
August 9, 2026 07:54
49dfd23 to
e75c72e
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.
Fork-internal verification before opening upstream. Confirms the job still passes without the
C:\Program Files\Git\binPATH addition that earlier rounds carried — round 3 measured that directory as already first on PATH, so it should be unnecessary.Summary by Sourcery
Add a Windows CI job to build and run tests while adjusting shell and line-ending behavior for that platform.
CI:
Tests: