mirror of
https://github.com/jongracecox/anybadge.git
synced 2026-01-06 12:21:12 +01:00
test: Add tox testing
Add `tox.ini` config with supported versions, and a new tox CI workflow to run tox tests on master branch changes. This is "expensive" so we may consider limiting execution further.
This commit is contained in:
committed by
Jon Grace-Cox
parent
43a4bea37c
commit
e6318f3446
32
.github/workflows/tox.yaml
vendored
Normal file
32
.github/workflows/tox.yaml
vendored
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
name: Run Tox Tests
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master # Run only on the master branch
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
name: Test with Tox
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
python-version: [3.7, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: ${{ matrix.python-version }}
|
||||||
|
|
||||||
|
- name: Install tox
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install tox
|
||||||
|
|
||||||
|
- name: Run Tox
|
||||||
|
run: tox -e py${{ matrix.python-version }}
|
||||||
@@ -216,6 +216,15 @@ inv package.build && inv package.install && inv test.cli
|
|||||||
|
|
||||||
Note that this will force install the built wheel from the project `dist/` directory over any existing local install.
|
Note that this will force install the built wheel from the project `dist/` directory over any existing local install.
|
||||||
|
|
||||||
|
### Tox tests
|
||||||
|
|
||||||
|
To run tox tests against all supported Python versions:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pip install tox
|
||||||
|
tox
|
||||||
|
```
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
The `README.md` file contains a table showing example badges for the different built-in colors. If you modify the
|
The `README.md` file contains a table showing example badges for the different built-in colors. If you modify the
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ Python project for generating badges for your projects
|
|||||||
|
|
||||||
[](https://www.buymeacoffee.com/jongracecox)
|
[](https://www.buymeacoffee.com/jongracecox)
|
||||||
|
|
||||||
Supports: Python 3.7-3.9 (2.7-3.6 support has been dropped)
|
Supports: Python 3.7-3.13 (2.7-3.6 support has been dropped)
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
|
|||||||
@@ -5,5 +5,6 @@ pytest
|
|||||||
pytest-cov
|
pytest-cov
|
||||||
requests
|
requests
|
||||||
setuptools
|
setuptools
|
||||||
|
tox
|
||||||
types-requests
|
types-requests
|
||||||
wheel
|
wheel
|
||||||
|
|||||||
Reference in New Issue
Block a user