https://github.com/paolorechia/pox
Tox GitHub Action by @paolorechia... "pox"
https://github.com/paolorechia/pox
ghaction python3 testing tox
Last synced: 9 months ago
JSON representation
Tox GitHub Action by @paolorechia... "pox"
- Host: GitHub
- URL: https://github.com/paolorechia/pox
- Owner: paolorechia
- License: mit
- Archived: true
- Created: 2022-03-01T08:49:33.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-01T09:20:03.000Z (over 4 years ago)
- Last Synced: 2025-06-30T15:03:38.344Z (about 1 year ago)
- Topics: ghaction, python3, testing, tox
- Language: JavaScript
- Homepage:
- Size: 16.5 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Pox
## Features
- Runs a specific `tox` environment in your repository
- Full tox output in action logs
- Caches `tox` cache between runs
Your first run might take a bit longer
## How to use
For instance, if you setup the following `tox.ini` file:
```
[tox]
envlist = py38-mode-{unit}
[testenv:py38-mode-unit]
deps =
-rrequirements.txt
mypy
black
flake8
pytest
pytest-cov
pytest-asyncio
coverage-badge
commands =
black src
black test
mypy src
flake8 src
pytest --cov=src -v --ignore=test/integration
```
You can then setup the following GH Action:
```
on: [push]
jobs:
hello_world_job:
runs-on: ubuntu-latest
name: tox test
steps:
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Checkout
uses: actions/checkout@v2
- name: Tox Action Step
id: tox
uses: paolorechia/pox@v1.0
with:
tox_env: 'py38-mode-unit'
- name: Get the output success flag
run: |
echo "Tests have passed: ${{ steps.tox.outputs.success_flag }}"
```
Notice in particular that this block
```
with:
tox_env: 'py38-mode-unit'
```
Must match the environment name in `tox.ini` line 2: `[testenv:py38-mode-unit]`
You must also make sure to set the correct `python-version`:
```
with:
python-version: '3.8'
```