ci: install tox-gh-actions so each matrix job runs only its own env#305
Merged
Conversation
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
marked this pull request as ready for review
July 16, 2026 14:59
jconstance-amplify
requested review from
aoskotsky-amplify,
cl3086 and
kkozik-amplify
July 16, 2026 14:59
aoskotsky-amplify
approved these changes
Jul 16, 2026
jconstance-amplify
added a commit
that referenced
this pull request
Jul 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tox.inihas always had a[gh-actions]block mapping each Python version to its ownpyNN-unitenv, but thetox-gh-actionsplugin that activates it was never installed inpr_check.yml— so plaintoxtried to run every env inenvliston every matrix job, regardless of which single interpreteractions/setup-pythonhad installed for that job.toxtreated a missing interpreter as aSKIP. The workflow's unpinnedtox>=4.0.9,<5install recently resolved4.56.4(up from4.53.0on the last green run), and that version bump flips a missing interpreter into a hardFAIL— breaking every matrix job except whichever Python version(s) happen to already be on the runner'sPATH. Confirmed viagit show <ruff-migration-commit> --stat: that PR's diff touches neithertox.ininorpr_check.yml, so this is a pre-existing, unrelated regression, not something introduced by the ruff migration.tox-gh-actionsalongsidetoxin the workflow so the existing[gh-actions]mapping actually takes effect, scoping each job to just its own env.Verification
tox==4.56.4(matching CI) and notox-gh-actions—toxfailed 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).tox-gh-actionsinto that venv and reran underGITHUB_ACTIONS=true: with a Python 3.13 interpreter,toxnow runs onlypy313-unitand passes; repeated with a Python 3.11 venv,toxruns onlypy311-unitand passes. This matches exactly what each CI matrix job needs.Test plan
tox==4.56.4.toxto a single env under both Python 3.11 and 3.13, matching the CI matrix's per-job behavior.🤖 Generated with Claude Code