-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Executables installed via uv
don't work in GitHub Actions on Windows
#1639
Comments
That sounds like it can't find python for some reason. I can take a look |
I wonder if it's related to the venv "trick". The trampoline (it creates the call that failes above) should construct the following command: <path_to_scripts>\python.exe <path_to_scripts>\black.exe where Now, I would expect that it can find the python.exe just fine because our activation script ensures that there's a python.exe next to the scripts. I won't have time to look into this before tomorrow but maybe something stands out for you why the python.exe wouldn't be found |
Ah, that would make some sense, given that I wasn't able to repro this one locally — I'm not using the "trick" locally, of course! |
Unfortunately I really know very little about this area. What I can tell you -- which you may already know, and may not be relevant -- is that the |
We can figure it out together. I know very little about how venv works on windows ;)
I think this is the issue because our trampoline script assumes that the script and the python.exe are in the same directory which they're not according to your description. So we'll need another way to find the python installation. I need to look into what venv does but I wonder if we should parse out the shebang header from the python scrpt. |
Hmmm... I tried using It gets much further: |
I'm just guessing but I get the impression that the tests run into the same problem because they run without activating a venv? |
I have a working workflow in AlexWaygood/typeshed-stats#192 where I migrated most of the pipeline to use the native shell instead of It also works if you source the activation script instead of setting That makes me think that this is some path/environment variable issue rather than an issue with |
Agreed, I think we figured out that this isn't, fundamentally, an issue with Closing in favour of #1386 |
Following #1523, standalone executables installed via
uv
seem to work fine on Windows locally. However, they still don't seem to be working on Windows in the context of GitHub Actions. (By "standalone executables", I mean simply invokingblack
rather thanpython -m black
, or simply invokingcoverage
rather thanpython -m coverage
.) For a repro, see this PR, where CI is passing on MacOS and Linux, but not Windows:uv
in CI for thetest.yml
workflow AlexWaygood/typeshed-stats#190The error occurs when the workflow tries to run
coverage run -m pytest
, and the error message is:The text was updated successfully, but these errors were encountered: