tox-dev / tox-gh

Github Action support for tox 4 and later
MIT License
53 stars 7 forks source link

Possible regression with tox-gh v1.4.4 #151

Open Zeitsperre opened 3 weeks ago

Zeitsperre commented 3 weeks ago

It appears that some behaviour has changed in v1.4.4 and is preventing the proper environment from being run. See: https://github.com/Ouranosinc/figanos/actions/runs/11669868968/job/32492859426

Note in the logs that tox-gh is correctly identifying that it is running in GitHub Workflows:

ROOT: running tox-gh
ROOT: tox-gh set py310-coveralls

But after running the tests for the proper environment, it continues with others:

...
py310: OK ✔ in 1 minute 9.64 seconds
  py311: skipped because could not find python interpreter with spec(s): py311
  py311: SKIP ⚠ in 0.01 seconds
  py312: skipped because could not find python interpreter with spec(s): py312
  py312: SKIP ⚠ in 0.01 seconds
  py313: skipped because could not find python interpreter with spec(s): py313
  py313: SKIP ⚠ in 0.01 seconds
  docs: setuptools-75.3.0-py3-none-any.whl already present in /home/runner/.local/share/virtualenv/wheel/3.10/embed/3/setuptools.json
  docs: wheel-0.44.0-py3-none-any.whl already present in /home/runner/.local/share/virtualenv/wheel/3.10/embed/3/wheel.json
  docs: pip-24.3.1-py3-none-any.whl already present in /home/runner/.local/share/virtualenv/wheel/3.10/embed/3/pip.json
...

The previous versions running in my CI (tox==4.21.0, tox-gh==1.3.2) worked as expected.

gaborbernat commented 3 weeks ago

PR welcome to fix it 🤔

Zeitsperre commented 3 weeks ago

I'd be interested to try my hand at figuring out where the problem is, but I wouldn't know where to start. How exactly does the hook get called for tox-gh? I'm guessing that tox.plugin.impl is called during setup?

gaborbernat commented 3 weeks ago

Yeah tox uses pluggy to allow code injection, see the impl annotations here https://github.com/tox-dev/tox-gh/blob/main/src/tox_gh/plugin.py#L64

https://tox.wiki/en/latest/plugins.html documents each end point and when is called

kurtraschke commented 3 weeks ago

This seems to occur only with tox.ini configuration. Migrating to pyproject.toml resulted in proper operation.