Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/paolorechia/pox
Tox GitHub Action by @paolorechia... "pox"
https://github.com/paolorechia/pox
ghaction python3 testing tox
Last synced: 29 days ago
JSON representation
Tox GitHub Action by @paolorechia... "pox"
- Host: GitHub
- URL: https://github.com/paolorechia/pox
- Owner: paolorechia
- License: mit
- Created: 2022-03-01T08:49:33.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-01T09:20:03.000Z (almost 3 years ago)
- Last Synced: 2024-11-25T19:04:56.250Z (about 1 month 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 runsYour 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-badgecommands =
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/[email protected]
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'
```