1
0
Fork 0
mirror of synced 2024-12-22 06:01:07 -05:00

Update CI to use tox tests

This commit is contained in:
Kurt McKee 2022-05-12 16:30:44 -05:00
parent 57a27a770c
commit ee3646bba3
2 changed files with 38 additions and 11 deletions

View file

@ -6,22 +6,33 @@ on:
- cron: '0 8 * * 6'
jobs:
test:
runs-on: ubuntu-latest
env:
PIP_DISABLE_PIP_VERSION_CHECK: 1
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest"]
python: ["2.7", "pypy2", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "pypy3"]
name: "Test: Python ${{ matrix.python }}"
include:
- os: "windows-latest"
python: "3.8"
- os: "windows-latest"
python: "3.9"
- os: "windows-latest"
python: "3.10"
runs-on: ${{ matrix.os }}
name: "Python ${{ matrix.python }} on ${{ matrix.os }}"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- run: ./test/test
fmt:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: psf/black@stable
- name: "Install dependencies"
run: |
python -m pip install --disable-pip-version-check --upgrade pip setuptools
python -m pip install --disable-pip-version-check tox tox-gh-actions
- name: "Run tests"
run: |
python -m tox

18
tox.ini
View file

@ -25,7 +25,7 @@ deps =
all_platforms: coverage
commands =
all_platforms: coverage run -m pytest
all_platforms: coverage run -m pytest tests/
most_platforms: pytest tests/
@ -78,3 +78,19 @@ source =
[coverage:html]
directory = htmlcov
[gh-actions]
python =
; Run on all platforms (Linux, Mac, and Windows)
3.8: py38-all_platforms
3.9: py39-all_platforms, py39-black, py39-isort
3.10: py310-all_platforms
; Run on most platforms (Linux and Mac)
pypy-2: pypy2-most_platforms
pypy-3: pypy3-most_platforms
2.7: py27-most_platforms
3.5: py35-most_platforms
3.6: py36-most_platforms
3.7: py37-most_platforms