-
Notifications
You must be signed in to change notification settings - Fork 262
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
Can't cd
in test-command on Windows
#1448
Comments
The problem isn't the CIBW_TEST_COMMAND : >
cd {project} &&
poetry install --with devel --sync --no-root &&
poetry run tox --skip-pkg-install -e py${{ matrix.python-version }}-${{ matrix.tox_os }} (Notice you changed It would be even better in your pyproject.toml, but the expansion would be missing. Do you really want to make a poetry environment that you install tox into to make a tox environment to tests something already in an environment in cibuildwheel, though? |
yes, because in this way I can:
I know it's redundant, but it's the only way I found to have all the above points checked. I've then changed with > character, now the error now is
seems that the change directory command, before poetry command, is not executed. Thanks. |
Isn't "dir" the way to change directories in Windows? We also strongly recommend running the tests from a different directory so you don't pick up build artifacts. Maybe point at or copy the files you need, pyproject.toml and possibly tox.ini (if you aren't placing it inside pyproject.toml)? |
it's cd even under windows. |
Ahh, oops, I remembered something was different, but yeah, it's |
from within a powershell, the from within a git bash, |
It should be cmd. And it is on one line, |
tested all the cases, no one works 😞 using ; on one linecommit gpongelli/pycode128@fdfc543
Using && on one linecommit gpongelli/pycode128@c2aa9d0
using && on multiple linecommit gpongelli/pycode128@165a88c
any idea on how to solve? is this case tested into cibuildwheel's test? thanks. |
This is weird... I'd expect Using && on one line above to work. We do test command chaining in cibuildwheel's test suite, but on the before-build command, and not with a 'cd'. Is there something weird happening between |
Here it is, commit gpongelli/pycode128@cb15d66 execution https://github.com/gpongelli/pycode128/actions/runs/4579006619/jobs/8086321785 Error
seems |
Yeah, it looks like Looking on stack overflow, you might need the |
The difference being that cd on windows won't change drive without |
You got it 🚀
That’s very weird, but it’s windows like 😅 Execution https://github.com/gpongelli/pycode128/actions/runs/4582036464/jobs/8091990316
Now the stage fails because of pytest 😉 thank you @joerick , you can close the issue (or add some tips in your docs about windows execution on one line and /d in case of cd 😉 ). |
cd
in test-command on Windows
Description
Hi,
looking at the docs, seems that's possible to have multiline commands working on all OSes, writing things in format like
cmd1 && cmd2
orIn a GitHub action I've the following test instruction:
it works correctly for MacOS and for Linux, so each row is executed correctly and I can see the log also of the third step (tox launches pytest under the hood), but under Windows OS I get this error
Running
poetry run tox --skip-pkg-install -e py3.11-win
locally on my machine it works as expected.I've also tried without &&
but seems nothing happens and, most dangerous, it result as passed 😮
Some links:
Execution without && : https://github.com/gpongelli/pycode128/actions/runs/4565065623/jobs/8055715603
Github workflow: https://github.com/gpongelli/pycode128/blob/2.5.0/.github/workflows/complete.yml
Execution with &&: https://github.com/gpongelli/pycode128/actions/runs/4566789867/jobs/8059823600#step:27:436
Github Workflow: https://github.com/gpongelli/pycode128/blob/test_cibw_failing/.github/workflows/complete.yml
ps:
the test execution must all fail on all OSes due to defect into code, spot by pytest
Thanks.
Build log
https://github.com/gpongelli/pycode128/actions/runs/4566789867/jobs/8059823600#step:27:436
CI config
https://github.com/gpongelli/pycode128/blob/test_cibw_failing/.github/workflows/complete.yml
The text was updated successfully, but these errors were encountered: