skillfed

tox-gh-actions

Seamless integration of tox into GitHub Actions

tox-gh-actions v3.5.0 631.1K downloads/30d#5,660 on PyPI256
Permissive license MIT Active released

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-actions

uv

uv add tox-gh-actions

poetry

poetry add tox-gh-actions

Installing 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

Development Status :: 5 - Production/StableFramework :: toxIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: LibrariesTopic :: Software Development :: TestingTopic :: UtilitiesTyping :: Typed

Tags

tox github actions integrationci matrix python version testingautomated tox environment selectiongithub actions test matrixtox ci pluginpython version conditional testinggithub actions workflow tox
ci-cdgithub-actionstesting-automation

More Libraries packages