Skip to content


Use this GitHub Action with your project

Add this Action to an existing workflow or create a new one.

View on Marketplace
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Run Tox tests Run tests with code in this repository

Tox Github Action

This GitHub action tests a checked-out Python project using Tox.


- uses: fedora-python/tox-github-action
    # The tox environment to run
    # Default: py311 (subject to change as new Python releases come out)
    tox_env: py311

Add the action to your workflow file, e.g. .github/workflows/main.yml, after checking out your code.

You can use the matrix strategy to run with multiple Tox environments. For an example, see this project's workflow. Unfortunately, you need to repeat all the environment names from your Tox configuration. (As far as we know, this is required in order to have individual environments show up as separate runs on GitHub. Discuss this limitation in issue 8.)

You can also install RPM packages from Fedora by setting dnf_install to a space-separated list of provides, such as:

  • Fedora package names, e.g. libgit2-devel,
  • pkgconfig names, e.g. pkgconfig(libffi),
  • commands, e.g. /usr/bin/cowsay, ...
- uses: fedora-python/tox-github-action
    tox_env: py38
    dnf_install: pkgconfig(libffi) libgit2-devel

The string will be literally used in dnf install ..., so you can also use groups or DNF options.

If your application isn't in the root of your project, set workdir. The action will switch to the specified path before tox execution.

- uses: fedora-python/tox-github-action
    tox_env: py38
    workdir: "python/"


Until version 0.4, this action always used the latest fedora-python-tox image. Since version 34.0, the first number in the version (also sometimes referred to as the "major version") represents the release of Fedora used in the image.


  • Uses Fedora 37 as the base container image.
  • PyPy 3.7 is no longer available.


  • Uses Fedora 36 as the base container image.


  • Allows to run tests from a subdirectory via workdir.


  • Uses Fedora 35 as the base container image.
  • No longer supports Python 3.5 and PyPy 3.6.
  • Newly supports PyPy 3.7, 3.8 and 3.9.


  • First version pinned explicitly to Fedora 34.


The code, content and configuration in this repository is given away unter the CC0 1.0 Universal Public Domain Dedication:

May it serve you well!