| 1 |
name: Tox Test |
| 2 |
|
| 3 |
on: |
| 4 |
- push |
| 5 |
- pull_request |
| 6 |
|
| 7 |
jobs: |
| 8 |
build: |
| 9 |
runs-on: ubuntu-latest |
| 10 |
strategy: |
| 11 |
fail-fast: false |
| 12 |
matrix: |
| 13 |
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14', pypy3.10, pypy3.11] |
| 14 |
|
| 15 |
steps: |
| 16 |
- uses: actions/checkout@v5 |
| 17 |
- name: Set up Python ${{ matrix.python-version }} |
| 18 |
uses: actions/setup-python@v6 |
| 19 |
with: |
| 20 |
python-version: ${{ matrix.python-version }} |
| 21 |
allow-prereleases: true |
| 22 |
- name: Install dependencies |
| 23 |
run: | |
| 24 |
python -m pip install --upgrade pip |
| 25 |
python -m pip install tox tox-gh-actions |
| 26 |
- name: Test with tox |
| 27 |
run: tox |
| 28 |
|
| 29 |
build-dist: |
| 30 |
runs-on: ubuntu-latest |
| 31 |
steps: |
| 32 |
- uses: actions/checkout@v5 |
| 33 |
- name: Set up Python 3.x |
| 34 |
uses: actions/setup-python@v6 |
| 35 |
with: |
| 36 |
python-version: '3.x' |
| 37 |
- name: Build and check distributions |
| 38 |
run: | |
| 39 |
python -m pip install --upgrade pip |
| 40 |
python -m pip install build twine |
| 41 |
python -m build --sdist --wheel --outdir dist/ |
| 42 |
python -m twine check dist/* |