It seems like --skip-pkg-install influences the config detection in tox somehow, making it think there's no config present. I'm trying to handle the compatibility quirks in the CI of https://github.com/ansible-community/ansible-pygments — a fairly simple project with a simple testing setup. One thing that may be a bit less common is building the dists and then using them via --installpkg.
Once I've added a workaround for https://github.com/tox-dev/tox/issues/2442, jobs running Linux or macOS succeeded running tests. But Windows was failing.
I looked inside and discovered some weird logs — it does not run any envs and succeeds with that.
First off, I was lucky to notice this because the tox invocation returns a successful status while not running any env at all — it only prints out a warning saying No tox.ini or setup.cfg or pyproject.toml found, assuming empty tox.ini and exits. Good that I had a subsequent step that actually failed because of a missing junit file. In the CI setups that have the tox invocation as the last step or the following steps that don't depend on it succeeding, the maintainers won't notice that nothing actually runs, making the CI expectations misleading. Well, if they don't also have some sort of code coverage that would notice win-specific gaps, that is.
I also have the CI re-run failing invocations with maximum verbosity for tox and pytest. So maybe that output will shed some light on what's happening — I haven't checked the source code to debug this because I don't have a Windows machine in my possession.
Environment
Provide at least:
OS: windows-latest @ GHA
pip list of the host Python where tox is installed: cachetools-5.2.0 chardet-5.1.0 colorama-0.4.6 distlib-0.3.6 filelock-3.8.2 packaging-22.0 platformdirs-2.6.0 pluggy-1.0.0 pyproject-api-1.2.1 tox-4.0.8 virtualenv-20.17.1 (this is from the last line in pip install, my CI setup doesn't have a pip list in it)
Output of running tox
$ python -m tox --parallel auto --parallel-live --skip-missing-interpreters false -vvvvv --skip-pkg-install -- --no-cov -vvvvv --lf
ROOT: 218 D setup logging to NOTSET on pid 2400 [tox\report.py:221]
ROOT: 296 W No tox.ini or setup.cfg or pyproject.toml found, assuming empty tox.ini at D:\a\ansible-pygments\ansible-pygments [tox\config\source\discover.py:77]
python: 328 I find interpreter for spec PythonSpec() [virtualenv\discovery\builtin.py:56]
python: 343 I proposed PythonInfo(spec=CPython3.11.0.final.0-64, exe=C:\hostedtoolcache\windows\Python\3.11.0\x64\python.exe, platform=win32, version='3.11.0 (main, Oct 24 2022, 18:26:48) [MSC v.1933 64 bit (AMD64)]', encoding_fs_io=utf-8-cp1252) [virtualenv\discovery\builtin.py:63]
python: 343 D accepted PythonInfo(spec=CPython3.11.0.final.0-64, exe=C:\hostedtoolcache\windows\Python\3.11.0\x64\python.exe, platform=win32, version='3.11.0 (main, Oct 24 2022, 18:26:48) [MSC v.1933 64 bit (AMD64)]', encoding_fs_io=utf-8-cp1252) [virtualenv\discovery\builtin.py:65]
python: 343 D symlink on filesystem does work [virtualenv\info.py:43]
python: 343 D filesystem is not case-sensitive [virtualenv\info.py:24]
python: 390 W skip building and installing the package [tox\tox_env\runner.py:147]
python: OK (0.06 seconds)
congratulations :) (0.17 seconds)
Minimal example
I'm not sure, actually. But my suspects are --skip-pkg-install or --notest --installpkg ... — the former is followed by the latter, similar to tox's own CI setup.
Issue
It seems like
--skip-pkg-install
influences the config detection in tox somehow, making it think there's no config present. I'm trying to handle the compatibility quirks in the CI of https://github.com/ansible-community/ansible-pygments — a fairly simple project with a simple testing setup. One thing that may be a bit less common is building the dists and then using them via--installpkg
. Once I've added a workaround for https://github.com/tox-dev/tox/issues/2442, jobs running Linux or macOS succeeded running tests. But Windows was failing. I looked inside and discovered some weird logs — it does not run any envs and succeeds with that.First off, I was lucky to notice this because the tox invocation returns a successful status while not running any env at all — it only prints out a warning saying
No tox.ini or setup.cfg or pyproject.toml found, assuming empty tox.ini
and exits. Good that I had a subsequent step that actually failed because of a missing junit file. In the CI setups that have the tox invocation as the last step or the following steps that don't depend on it succeeding, the maintainers won't notice that nothing actually runs, making the CI expectations misleading. Well, if they don't also have some sort of code coverage that would notice win-specific gaps, that is. I also have the CI re-run failing invocations with maximum verbosity for tox and pytest. So maybe that output will shed some light on what's happening — I haven't checked the source code to debug this because I don't have a Windows machine in my possession.Environment
Provide at least:
pip list
of the host Python wheretox
is installed:cachetools-5.2.0 chardet-5.1.0 colorama-0.4.6 distlib-0.3.6 filelock-3.8.2 packaging-22.0 platformdirs-2.6.0 pluggy-1.0.0 pyproject-api-1.2.1 tox-4.0.8 virtualenv-20.17.1
(this is from the last line inpip install
, my CI setup doesn't have apip list
in it)Output of running tox
Minimal example
I'm not sure, actually. But my suspects are
--skip-pkg-install
or--notest --installpkg ...
— the former is followed by the latter, similar to tox's own CI setup.The CI log is here: https://github.com/ansible-community/ansible-pygments/actions/runs/3680979306/jobs/6227176796#step:11:25.