{"id":20784155,"url":"https://github.com/tox-dev/tox-gh","last_synced_at":"2025-04-04T11:07:52.601Z","repository":{"id":39566971,"uuid":"403377429","full_name":"tox-dev/tox-gh","owner":"tox-dev","description":"Github Action support for tox 4 and later","archived":false,"fork":false,"pushed_at":"2025-03-24T18:46:42.000Z","size":182,"stargazers_count":60,"open_issues_count":2,"forks_count":9,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T10:02:39.149Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tox-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"tidelift":"pypi/tox-gh"}},"created_at":"2021-09-05T17:56:44.000Z","updated_at":"2025-03-24T18:46:46.000Z","dependencies_parsed_at":"2023-02-19T10:25:17.973Z","dependency_job_id":"a9d02b25-e891-465d-8ebc-f67fe38a781c","html_url":"https://github.com/tox-dev/tox-gh","commit_stats":{"total_commits":42,"total_committers":4,"mean_commits":10.5,"dds":0.5714285714285714,"last_synced_commit":"4c328371f9bf72d73a47f2be4c025daaffd1ef8a"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tox-dev%2Ftox-gh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tox-dev%2Ftox-gh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tox-dev%2Ftox-gh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tox-dev%2Ftox-gh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tox-dev","download_url":"https://codeload.github.com/tox-dev/tox-gh/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247166144,"owners_count":20894652,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T14:26:34.785Z","updated_at":"2025-04-04T11:07:52.577Z","avatar_url":"https://github.com/tox-dev.png","language":"Python","readme":"# tox-gh\n\n[![PyPI version](https://badge.fury.io/py/tox-gh.svg)](https://badge.fury.io/py/tox-gh)\n[![PyPI Supported Python Versions](https://img.shields.io/pypi/pyversions/tox-gh.svg)](https://pypi.python.org/pypi/tox-gh/)\n[![check](https://github.com/tox-dev/tox-gh/actions/workflows/check.yaml/badge.svg)](https://github.com/tox-dev/tox-gh/actions/workflows/check.yaml)\n[![Downloads](https://static.pepy.tech/badge/tox-gh/month)](https://pepy.tech/project/tox-gh)\n\n**tox-gh** is a tox plugin, which helps run tox on GitHub Actions with multiple different Python versions on multiple\nworkers in parallel.\n\n## Features\n\nWhen running tox on GitHub Actions, tox-gh:\n\n- detects, which environment to run based on configurations (or bypass detection and set it explicitly via the\n  `TOX_GH_MAJOR_MINOR` environment variable),\n- provides utilities such as\n  [grouping log lines](https://github.com/actions/toolkit/blob/main/docs/commands.md#group-and-ungroup-log-lines).\n\n## Usage\n\n1. Add configurations under `[gh]` section along with your tox configuration.\n2. Install `tox-gh` package in the GitHub Actions workflow before running `tox` command.\n\n## Examples\n\n### Basic Example\n\nAdd `[gh]` section to the same file as tox configuration.\n\nIf you're using `tox.ini`:\n\n```ini\n[gh]\npython =\n    3.13 = 3.13, type, dev, pkg_meta\n    3.12 = 3.12\n    3.11 = 3.11\n```\n\nFor `tox.toml`:\n\n```toml\n[gh.python]\n\"3.13\" = [\"3.13\", \"type\", \"pkg_meta\"]\n\"3.12\" = [\"3.12\"]\n\"3.11\" = [\"3.11\"]\n```\n\nFor `pyproject.toml`:\n\n```toml\n[tool.tox.gh.python]\n\"3.13\" = [\"3.13\", \"type\", \"pkg_meta\"]\n\"3.12\" = [\"3.12\"]\n\"3.11\" = [\"3.11\"]\n```\n\nThis will run a different set of tox environments on different python versions set up via GitHub `setup-python` action:\n\n- on Python 3.13 job, tox runs `3.13`, `type` and `pkg_meta` environment,\n- on Python 3.12 job, tox runs `3.12` environment,\n- on Python 3.11 job, tox runs `3.11` environment.\n\n#### Workflow Configuration\n\nA bare-bones example would be `.github/workflows/check.yaml`:\n\n```yaml\njobs:\n  test:\n    name: test with ${{ matrix.env }} on ${{ matrix.os }}\n    runs-on: ${{ matrix.os }}\n    strategy:\n      fail-fast: false\n      matrix:\n        env:\n          - \"3.13\"\n          - \"3.12\"\n        os:\n          - ubuntu-latest\n          - macos-latest\n    steps:\n      - uses: actions/checkout@v4\n      - name: Install the latest version of uv\n        uses: astral-sh/setup-uv@v3\n      - name: Install tox\n        run: uv tool install --python-preference only-managed --python 3.13 tox --with tox-uv --with tox-gh\n      - name: Install Python\n        if: matrix.env != '3.13'\n        run: uv python install --python-preference only-managed ${{ matrix.env }}\n      - name: Setup test suite\n        run: tox run -vv --notest --skip-missing-interpreters false\n        env:\n          TOX_GH_MAJOR_MINOR: ${{ matrix.env }}\n      - name: Run test suite\n        run: tox run --skip-pkg-install\n        env:\n          TOX_GH_MAJOR_MINOR: ${{ matrix.env }}\n```\n\nA more exhaustive example would be `.github/workflows/check.yaml`:\n\n```yaml\nname: check\non:\n  workflow_dispatch:\n  push:\n    branches: [\"main\"]\n    tags-ignore: [\"**\"]\n  pull_request:\n  schedule:\n    - cron: \"0 8 * * *\"\n\nconcurrency:\n  group: check-${{ github.ref }}\n  cancel-in-progress: true\n\njobs:\n  test:\n    name: test with ${{ matrix.env }} on ${{ matrix.os }}\n    runs-on: ${{ matrix.os }}\n    strategy:\n      fail-fast: false\n      matrix:\n        env:\n          - \"3.13\"\n          - \"3.12\"\n          - \"3.11\"\n        os:\n          - ubuntu-latest\n          - macos-latest\n          - windows-latest\n    steps:\n      - uses: actions/checkout@v4\n        with:\n          fetch-depth: 0\n      - name: Install the latest version of uv\n        uses: astral-sh/setup-uv@v3\n        with:\n          enable-cache: true\n          cache-dependency-glob: \"pyproject.toml\"\n          github-token: ${{ secrets.GITHUB_TOKEN }}\n      - name: Add .local/bin to Windows PATH\n        if: runner.os == 'Windows'\n        shell: bash\n        run: echo \"$USERPROFILE/.local/bin\" \u003e\u003e $GITHUB_PATH\n      - name: Install tox\n        run: uv tool install --python-preference only-managed --python 3.13 tox --with tox-uv --with tox-gh\n      - name: Install Python\n        if: matrix.env != '3.13'\n        run: uv python install --python-preference only-managed ${{ matrix.env }}\n      - name: Setup test suite\n        run: tox run -vv --notest --skip-missing-interpreters false\n        env:\n          TOX_GH_MAJOR_MINOR: ${{ matrix.env }}\n      - name: Run test suite\n        run: tox run --skip-pkg-install\n        env:\n          TOX_GH_MAJOR_MINOR: ${{ matrix.env }}\n```\n\n## FAQ\n\n- When a list of environments to run is specified explicitly via `-e` option or `TOXENV` environment variable `tox-gh`\n  respects the given environments and simply runs the given environments without enforcing its configuration.\n- The plugin only activates if the environment variable `GITHUB_ACTIONS` is `true`.\n","funding_links":["https://tidelift.com/funding/github/pypi/tox-gh"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftox-dev%2Ftox-gh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftox-dev%2Ftox-gh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftox-dev%2Ftox-gh/lists"}