Name | tox-gh JSON |
Version |
1.3.1
JSON |
| download |
home_page | |
Summary | Seamless integration of tox into GitHub Actions. |
upload_time | 2023-07-25 23:07:17 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.7 |
license | |
keywords |
environments
isolated
testing
virtual
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# tox-gh
[![PyPI version](https://badge.fury.io/py/tox-gh.svg)](https://badge.fury.io/py/tox-gh)
[![PyPI Supported Python Versions](https://img.shields.io/pypi/pyversions/tox-gh.svg)](https://pypi.python.org/pypi/tox-gh/)
[![check](https://github.com/tox-dev/tox-gh/actions/workflows/check.yml/badge.svg)](https://github.com/tox-dev/tox-gh/actions/workflows/check.yml)
**tox-gh** is a tox plugin which helps running tox on GitHub Actions with multiple different Python versions on multiple
workers in parallel.
## Features
When running tox on GitHub Actions, tox-gh
- detects which environment to run based on configurations and
- provides utilities such as
[grouping log lines](https://github.com/actions/toolkit/blob/main/docs/commands.md#group-and-ungroup-log-lines).
## Usage
1. Add configurations under `[gh]` section along with your tox configuration.
2. Install `tox-gh` package in the GitHub Actions workflow before running `tox` command.
## Examples
### Basic Example
Add `[gh]` section to the same file as tox configuration. If you're using `tox.ini`:
```ini
[gh]
python =
3.12 = py312
3.11 = py311, type
3.10 = py310
3.9 = py39
3.8 = py38
3.7 = py37
```
This will run different set of tox environments on different python versions set up via GitHub `setup-python` action:
- on Python 3.7 job, tox runs `py37` environment,
- on Python 3.8 job, tox runs `py38` environment,
- on Python 3.9 job, tox runs `py39` environment,
- on Python 3.10 job, tox runs `py310` environment,
- in Python 3.11 job, tox runs `py311` and `type` environments,
- on Python 3.12 job, tox runs `py312` environment.
#### Workflow Configuration
`.github/workflows/check.yml`:
```yaml
name: check
on:
push:
pull_request:
schedule:
- cron: "0 8 * * *"
concurrency:
group: check-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: test with ${{ matrix.py }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
py:
- "3.12"
- "3.11"
- "3.10"
- "3.9"
- "3.8"
- "3.7"
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup python for test ${{ matrix.py }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.py }}
- name: Install tox
run: python -m pip install tox-gh>=1.2
- name: Setup test suite
run: tox -vv --notest
- name: Run test suite
run: tox --skip-pkg-install
```
## FAQ
- When a list of environments to run is specified explicitly via `-e` option or `TOXENV` environment variable `tox-gh`
respects the given environments and simply runs the given environments without enforcing its configuration.
- The plugin only activates if the environment variable `GITHUB_ACTIONS` is `true`.
Raw data
{
"_id": null,
"home_page": "",
"name": "tox-gh",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "Bern\u00e1t G\u00e1bor <gaborjbernat@gmail.com>",
"keywords": "environments,isolated,testing,virtual",
"author": "",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/ff/b6/9e5f74b94da149db499929938fe61d0b69f19f637b067f42f0247b66e671/tox_gh-1.3.1.tar.gz",
"platform": null,
"description": "# 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.yml/badge.svg)](https://github.com/tox-dev/tox-gh/actions/workflows/check.yml)\n\n**tox-gh** is a tox plugin which helps running 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 and\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. If you're using `tox.ini`:\n\n```ini\n[gh]\npython =\n 3.12 = py312\n 3.11 = py311, type\n 3.10 = py310\n 3.9 = py39\n 3.8 = py38\n 3.7 = py37\n```\n\nThis will run different set of tox environments on different python versions set up via GitHub `setup-python` action:\n\n- on Python 3.7 job, tox runs `py37` environment,\n- on Python 3.8 job, tox runs `py38` environment,\n- on Python 3.9 job, tox runs `py39` environment,\n- on Python 3.10 job, tox runs `py310` environment,\n- in Python 3.11 job, tox runs `py311` and `type` environments,\n- on Python 3.12 job, tox runs `py312` environment.\n\n#### Workflow Configuration\n\n`.github/workflows/check.yml`:\n\n```yaml\nname: check\non:\n push:\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.py }} on ${{ matrix.os }}\n runs-on: ${{ matrix.os }}\n strategy:\n fail-fast: false\n matrix:\n py:\n - \"3.12\"\n - \"3.11\"\n - \"3.10\"\n - \"3.9\"\n - \"3.8\"\n - \"3.7\"\n os:\n - ubuntu-latest\n - macos-latest\n - windows-latest\n steps:\n - uses: actions/checkout@v3\n with:\n fetch-depth: 0\n - name: Setup python for test ${{ matrix.py }}\n uses: actions/setup-python@v4\n with:\n python-version: ${{ matrix.py }}\n - name: Install tox\n run: python -m pip install tox-gh>=1.2\n - name: Setup test suite\n run: tox -vv --notest\n - name: Run test suite\n run: tox --skip-pkg-install\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",
"bugtrack_url": null,
"license": "",
"summary": "Seamless integration of tox into GitHub Actions.",
"version": "1.3.1",
"project_urls": {
"Documentation": "https://github.com/tox-dev/tox-gh#tox-gh",
"Homepage": "https://github.com/tox-dev/tox-gh",
"Source": "https://github.com/tox-dev/tox-gh",
"Tracker": "https://github.com/tox-dev/tox-gh/issues"
},
"split_keywords": [
"environments",
"isolated",
"testing",
"virtual"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1d0ed4def5bb5dc08e7b8b42f595e9dcd233f50223739ecfa21f032b6de16b48",
"md5": "381bb967cdb2364206fb5a151c3114aa",
"sha256": "c671c62ce23ae519a557c3da81e9aa7e35b3a66c69bad71908e595921f83e82d"
},
"downloads": -1,
"filename": "tox_gh-1.3.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "381bb967cdb2364206fb5a151c3114aa",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 6158,
"upload_time": "2023-07-25T23:07:16",
"upload_time_iso_8601": "2023-07-25T23:07:16.333421Z",
"url": "https://files.pythonhosted.org/packages/1d/0e/d4def5bb5dc08e7b8b42f595e9dcd233f50223739ecfa21f032b6de16b48/tox_gh-1.3.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ffb69e5f74b94da149db499929938fe61d0b69f19f637b067f42f0247b66e671",
"md5": "6065f04ad92339f11ebcc8d59231d45e",
"sha256": "594af90b740c14735c41b914b41db2d2aa0360929a1746af32bda4b9fef9bf3d"
},
"downloads": -1,
"filename": "tox_gh-1.3.1.tar.gz",
"has_sig": false,
"md5_digest": "6065f04ad92339f11ebcc8d59231d45e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 6765,
"upload_time": "2023-07-25T23:07:17",
"upload_time_iso_8601": "2023-07-25T23:07:17.753840Z",
"url": "https://files.pythonhosted.org/packages/ff/b6/9e5f74b94da149db499929938fe61d0b69f19f637b067f42f0247b66e671/tox_gh-1.3.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-25 23:07:17",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "tox-dev",
"github_project": "tox-gh#tox-gh",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "tox-gh"
}