{"id":5525,"library":"tox-gh-actions","title":"Seamless integration of tox into GitHub Actions","description":"tox-gh-actions is a `tox` plugin that provides seamless integration of your `tox` test environments with GitHub Actions, automatically detecting Python versions from your workflow matrix and setting up problem matchers. It is an actively maintained library with frequent releases to support new Python versions and address issues.","status":"active","version":"3.5.0","language":"en","source_language":"en","source_url":"https://github.com/ymyzk/tox-gh-actions","tags":["tox","github-actions","ci","testing","plugin","automation"],"install":[{"cmd":"pip install tox-gh-actions","lang":"bash","label":"Install `tox-gh-actions`"}],"dependencies":[{"reason":"`tox-gh-actions` is a plugin for `tox` and requires it to function. It should be installed in the same Python environment as `tox`.","package":"tox","optional":false}],"imports":[{"note":"As a `tox` plugin, `tox-gh-actions` is not typically imported directly in user Python code. It extends `tox`'s functionality via its entry points.","symbol":"tox-gh-actions","correct":"Install `tox-gh-actions` alongside `tox`. It is automatically loaded by `tox`."}],"quickstart":{"code":"name: Test\n\non: [push, pull_request]\n\njobs:\n  test:\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        python-version: [\"3.8\", \"3.9\", \"3.10\", \"3.11\"]\n\n    steps:\n    - uses: actions/checkout@v4\n    - name: Set up Python ${{ matrix.python-version }}\n      uses: actions/setup-python@v5\n      with:\n        python-version: ${{ matrix.python-version }}\n    - name: Install dependencies\n      run: |\n        python -m pip install --upgrade pip\n        pip install tox tox-gh-actions\n    - name: Run tox\n      run: tox\n","lang":"yaml","description":"This GitHub Actions workflow demonstrates how to use `tox-gh-actions`. It sets up a matrix of Python versions, installs `tox` and `tox-gh-actions`, and then simply runs `tox`. The plugin automatically detects the Python version from the `python-version` matrix variable and maps it to the appropriate `tox` environment."},"warnings":[{"fix":"If you are using tox v4, ensure you are on tox-gh-actions v3.0.0 or later. If you are using tox v3, you must stick to tox-gh-actions v2.x.","message":"Version 3.0.0 introduced breaking changes for users upgrading from tox v3 to tox v4. tox-gh-actions v3.x is compatible with tox v4, while tox-gh-actions v2.x is for tox v3.","severity":"breaking","affected_versions":">=3.0.0 (when migrating from tox v3 to v4)"},{"fix":"Add `requires = tox-gh-actions` to your `tox.ini` file, usually at the top-level `[tox]` section or within specific environment configurations if needed.","message":"When using `tox`'s `requires` configuration in your `tox.ini` file, ensure `tox-gh-actions` is explicitly listed to guarantee the plugin is loaded correctly.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Upgrade to `tox-gh-actions` v3.1.3 or later to ensure stable behavior with parallel `tox` execution (`tox -p`).","message":"Early 3.1.x releases (3.1.0, 3.1.1, 3.1.2) had issues with `tox -p` (parallel execution) which could lead to `TypeError` or incorrect warning messages. These were resolved in subsequent patch releases.","severity":"gotcha","affected_versions":"3.1.0, 3.1.1, 3.1.2"}],"env_vars":null,"last_verified":"2026-04-13T00:00:00.000Z","next_check":"2026-07-12T00:00:00.000Z"}