Skip to content

ci: install tox-gh-actions so each matrix job runs only its own env#305

Merged
jconstance-amplify merged 1 commit into
mainfrom
ci-fix_tox_gh_actions_plugin
Jul 16, 2026
Merged

ci: install tox-gh-actions so each matrix job runs only its own env#305
jconstance-amplify merged 1 commit into
mainfrom
ci-fix_tox_gh_actions_plugin

Conversation

@jconstance-amplify

@jconstance-amplify jconstance-amplify commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • tox.ini has always had a [gh-actions] block mapping each Python version to its own pyNN-unit env, but the tox-gh-actions plugin that activates it was never installed in pr_check.yml — so plain tox tried to run every env in envlist on every matrix job, regardless of which single interpreter actions/setup-python had installed for that job.
  • This was silently masked as long as tox treated a missing interpreter as a SKIP. The workflow's unpinned tox>=4.0.9,<5 install recently resolved 4.56.4 (up from 4.53.0 on the last green run), and that version bump flips a missing interpreter into a hard FAIL — breaking every matrix job except whichever Python version(s) happen to already be on the runner's PATH. Confirmed via git show <ruff-migration-commit> --stat: that PR's diff touches neither tox.ini nor pr_check.yml, so this is a pre-existing, unrelated regression, not something introduced by the ruff migration.
  • Fix: install tox-gh-actions alongside tox in the workflow so the existing [gh-actions] mapping actually takes effect, scoping each job to just its own env.

Verification

  • Reproduced locally: built a throwaway venv with tox==4.56.4 (matching CI) and no tox-gh-actionstox failed on every env whose interpreter wasn't present locally (py38, py310), exactly matching the CI failure signature (could not find python interpreter matching any of the specs).
  • Installed tox-gh-actions into that venv and reran under GITHUB_ACTIONS=true: with a Python 3.13 interpreter, tox now runs only py313-unit and passes; repeated with a Python 3.11 venv, tox runs only py311-unit and passes. This matches exactly what each CI matrix job needs.

Test plan

  • Reproduced the CI failure locally with pinned tox==4.56.4.
  • Verified the fix scopes tox to a single env under both Python 3.11 and 3.13, matching the CI matrix's per-job behavior.
  • CI green on this PR (all 6 matrix jobs: 3.8–3.13).

🤖 Generated with Claude Code

tox.ini's [gh-actions] block has always mapped each Python version to
its own -unit env, but the plugin that activates it was never
installed, so plain `tox` tried every env in envlist regardless of
which interpreter the job set up. That was silently masked as long as
tox treated a missing interpreter as a SKIP; the workflow's unpinned
`tox>=4.0.9,<5` install recently resolved 4.56.4 (up from 4.53.0),
which flips a missing interpreter to a hard FAIL, breaking every job
except the one or two Python versions actually present on the runner.

Verified locally: with tox 4.56.4 and tox-gh-actions installed,
running tox under Python 3.11 and 3.13 (simulating the corresponding
CI matrix jobs) each scope to just their own env and pass; without the
plugin, the same setup fails on every env for a missing interpreter.
@jconstance-amplify
jconstance-amplify marked this pull request as ready for review July 16, 2026 14:59
@jconstance-amplify
jconstance-amplify requested a review from a team as a code owner July 16, 2026 14:59
@jconstance-amplify
jconstance-amplify merged commit 62e8e85 into main Jul 16, 2026
8 checks passed
@jconstance-amplify
jconstance-amplify deleted the ci-fix_tox_gh_actions_plugin branch July 16, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants