tox-gh-actions
Seamless integration of tox into GitHub Actions
What it is and what it does
tox-gh-actions is a tox plugin designed to streamline testing workflows on GitHub Actions by automatically mapping Python versions to the appropriate tox environments. When you run tox in a GitHub Actions job, the plugin reads a `[gh-actions]` configuration section from your tox.ini, setup.cfg, or pyproject.toml and selects which test environments to run based on the Python version (or other factors like environment variables) in that job. This eliminates the need to manually specify which environments to test on each Python version.
The plugin also provides utilities like GitHub Actions log grouping to organize test output. It supports multiple Python implementations including CPython, PyPy, and experimental Pyston support, and handles pre-release and free-threaded Python builds. The plugin respects explicit environment overrides via the `-e` flag or `TOXENV` variable, so you can still run specific environments when needed.
Use it for:
- Test your package on multiple Python versions with each job automatically running only its corresponding tox environment.
- Run different test suites per Python version (e.g., py312 runs unit tests, py314 runs both unit and type-checking).
- Test across multiple platforms and Python versions simultaneously by using environment variables to select platform-specific tox factors.
- Reduce boilerplate in CI workflows by letting the plugin handle environment selection instead of hardcoding it in workflow YAML.
- Support PyPy and other Python implementations in your test matrix with automatic environment mapping.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A tox plugin that automatically detects and runs the appropriate test environments on GitHub Actions based on the Python version in each job, with built-in log grouping support.
Yes. This is a lightweight, actively maintained plugin that solves a real friction point in GitHub Actions CI: mapping matrix jobs to tox environments. It has no security vulnerabilities, permissive licensing, low install friction, and a clear use case for anyone already using tox in a GitHub Actions workflow. Install it if you run tox on GitHub Actions with multiple Python versions.
Install
tox-gh-actions on PyPI
pip
pip install tox-gh-actionsuv
uv add tox-gh-actionspoetry
poetry add tox-gh-actionsInstalling tox-gh-actions
Before you install
Low friction: a single pure-Python dependency on tox with no compiled requirements. Actively maintained as of 2026-04-13 with 256 repository stars and a stable release cadence.
License in practice
MIT license permits unrestricted use, modification, and distribution in both open-source and proprietary projects with minimal attribution requirements.
Quickstart
pip install tox tox-gh-actions
Add to tox.ini:
[gh-actions]
python =
3.10: py310
3.12: py312
Run: tox
Requires tox to be installed first; intended for use within GitHub Actions workflows, not local development.
Verify before relying
- Whether the plugin works with tox versions older than the current release or has a minimum tox version requirement.
- Performance impact of log grouping on large test suites or workflows with many parallel jobs.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — tox |
| Maintenance | actively maintained — 296 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 631,075/month — #5,660 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: tox_gh_actions-3.5.0-py3-none-any.whl
Keywords: tox, github, github-actions, ci, testing
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
tox-ghtox-gh automatically selects and runs the…
permissive · top 15,000 on PyPI
lightning-utilitiesProvides reusable GitHub workflows, composite…
permissive · top 5,000 on PyPI
tox-dockerA tox plugin that manages Docker container…
permissive · top 15,000 on PyPI
github-action-utilsProvides Python functions to invoke GitHub…
permissive · top 5,000 on PyPI
tox-uvtox-uv replaces virtualenv and pip with uv in…
permissive · top 5,000 on PyPI
pytest-github-actions-annotate-failuresA pytest plugin that automatically annotates…
permissive · top 5,000 on PyPI
tox-uv-baretox-uv-bare is a tox plugin that replaces…
permissive · top 5,000 on PyPI
codemod-toxParses and modifies tox.ini configuration…
permissive · top 15,000 on PyPI
actionlint-pyactionlint-py provides a pip-installable…
permissive · top 15,000 on PyPI
toxtox automates testing across multiple Python…
permissive · top 1,000 on PyPI