ci: experimental MSYS2/MinGW test run#1122
Merged
Merged
Conversation
uv ships no MinGW wheel and fails to build from source there; the uv tests already skip via @has_uv when the command is absent. Assisted-by: ClaudeCode:claude-opus-4.8
Runs the suite under a real MSYS2/MINGW64 Python to exercise the nox.virtualenv._IS_MINGW code paths, previously only covered by mocked unit tests. Non-blocking (continue-on-error) until proven stable; feeds coverage into the cover job. uv comes from setup-uv (no uv CLI exists in MSYS2 repos), and the session is forced onto the virtualenv backend so the interpreter under test stays MinGW. Assisted-by: ClaudeCode:claude-opus-4.8
On a real MSYS2/MinGW host sys.platform is win32 but the native venv uses a POSIX bin/ layout (with .exe executables), so the Windows-layout assertions must exclude MinGW. Exercised by the experimental MSYS2 CI job. Assisted-by: ClaudeCode:claude-opus-4.8
uv can't inspect the MinGW interpreter, so creating a uv venv from it fails (wntrblm#1088). Mark the affected uv/script-mode tests xfail on MinGW (non-strict, so they xpass once wntrblm#1117 lands) to keep the experimental MSYS2 job green. Assisted-by: ClaudeCode:claude-opus-4.8
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
ognevny
reviewed
Jun 30, 2026
| include-hidden-files: true | ||
| if-no-files-found: error | ||
|
|
||
| # No uv CLI exists in any MSYS2 repo (the msys `uv` package only ships the |
There was a problem hiding this comment.
but what about https://packages.msys2.org/base/mingw-w64-uv? it may be broken a bit (msys2/MINGW-packages#21091), but it exists
ognevny
reviewed
Jun 30, 2026
| persist-credentials: false | ||
| - uses: msys2/setup-msys2@v2.32.0 | ||
| with: | ||
| msystem: MINGW64 |
There was a problem hiding this comment.
we recommend using UCRT64 environment, because MINGW64 is about to be deprecated
Collaborator
Author
There was a problem hiding this comment.
Thanks! I'll try to make a follow up soon
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.
Adding MSYS2 to help us with #1117.
🤖 AI text below 🤖
What
Adds an experimental, non-blocking (
continue-on-error: true) CI job that runs the test suite under a real MSYS2 / MINGW64 Python, plus the test/noxfile changes needed for the non-uv MinGW paths to pass.This PR is independent of #1117 (no shared commits; either can merge first).
Why
nox/virtualenv.pyhas MinGW-specific logic gated on_IS_MINGWthat, until now, was only covered by mocked unit tests (@mock.patch("nox.virtualenv._IS_MINGW", new=True)) — nothing ever ran it with_IS_MINGWactuallyTrue. This job exercises those paths on a genuine MSYS2 runner and feeds coverage into thecoverjob.What's included
msys2): MSYS2/MINGW64, virtualenv backend (forced, so the interpreter under test stays MinGW), uv fromastral-sh/setup-uvwithpath-type: inherit(no uv CLI exists in MSYS2 repos — themsysuvpackage only ships theuv_buildbackend),mingw-w64-x86_64-gccfor native build deps. Python version is whatever MSYS2 ships (detected at runtime).uvinto the test session on MinGW (no wheel; the uv tests@has_uv-skip when absent).bin/layout from correct virtualenv bin dir under mingw python #901, not the uv backend):test_bin_paths/test_create— gate theScripts/-layout assertions onnot IS_MINGW;test_creategains a MinGW branch (POSIXbin/dir holding.exeexecutables —python.exe/pip.exe, lowercaselib).test_bin_windows— pins_IS_MINGW=Falseso the Windows case is unaffected by the live MinGW host.Remaining red is #1117's, by design
With this PR's corrections in place, the only remaining
msys2failures are the uv-backend tests, which fail withuv venv -p .../bin/python.EXE → Failed to inspect Python interpreter— i.e. the #1088 bug that #1117 fixes (test_uv_creation,test_create_reuse_uv_environment,test_stale_environment[uv-virtualenv-False], and the threetest_noxfile_script_mode*). The job iscontinue-on-error, so the overall run is green; once #1117 lands it is fully green too (726 passed, 15 skipped, 100% coverage gate intact).Caveats