Seamless integration of tox into GitHub Actions
Project description
tox-gh-actions
tox-gh-actions is a tox plugin which helps running tox on GitHub Actions with multiple different Python versions. This project is inspired by tox-travis.
Usage
The following configuration will create 4 jobs when running the worlflow on GitHub Actions.
- On Python 2.7 job, tox runs
py27environment - On Python 3.5 job, tox runs
py34environment - On Python 3.6 job, tox runs
py35environment - On Python 3.7 job, tox runs
py37andmypyenvironments
tox.ini:
[tox]
envlist = py27, py35, py36, py37, mypy
[gh-actions]
python =
2.7: py27
3.5: py35
3.6: py36
3.7: py37, mypy
[testenv]
...
.github/workflows/<workflow>.yml:
name: Python package
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [2.7, 3.5, 3.6, 3.7]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Test with tox
run: tox
Advanced Usage
The following configuration will create 2 jobs when running the worlflow on GitHub Actions.
- On Python 2.7 job, tox runs
py27-django111environment - On Python 3.7 job, tox runs
py37-django111andpy37-django20environments
tox.ini:
[tox]
envlist = py27-django{111}, py37-django{111,20}
[gh-actions]
python =
2.7: py27
3.7: py37
[testenv]
...
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tox-gh-actions-0.3.0.tar.gz.
File metadata
- Download URL: tox-gh-actions-0.3.0.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.4.2 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f943d9a7009d97ed1aac1b0051b3eef97b07176bc040a2307de9461629fcdf88
|
|
| MD5 |
cbbd18c2ef4479cbcd3025022a012c14
|
|
| BLAKE2b-256 |
d751427d95648dc990a8a16a48894784792bd9aee3de24b6313aedda41cba540
|
File details
Details for the file tox_gh_actions-0.3.0-py2.py3-none-any.whl.
File metadata
- Download URL: tox_gh_actions-0.3.0-py2.py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.4.2 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
202c23c7de04f060d956961c65bfabcb6a13f08321225a05f902470b1a3e824a
|
|
| MD5 |
4c46b4e41904c4578e416494f4248b30
|
|
| BLAKE2b-256 |
2e4219d8ac8c7305c60652300d18638a3311a58e51deae1b7c070aa2b287c13c
|