Update CI to use tox tests
This commit is contained in:
parent
57a27a770c
commit
ee3646bba3
2 changed files with 38 additions and 11 deletions
31
.github/workflows/build.yml
vendored
31
.github/workflows/build.yml
vendored
|
@ -6,22 +6,33 @@ on:
|
||||||
- cron: '0 8 * * 6'
|
- cron: '0 8 * * 6'
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
env:
|
||||||
|
PIP_DISABLE_PIP_VERSION_CHECK: 1
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
os: ["ubuntu-latest", "macos-latest"]
|
||||||
python: ["2.7", "pypy2", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "pypy3"]
|
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:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python }}
|
python-version: ${{ matrix.python }}
|
||||||
- run: ./test/test
|
- name: "Install dependencies"
|
||||||
fmt:
|
run: |
|
||||||
name: Format
|
python -m pip install --disable-pip-version-check --upgrade pip setuptools
|
||||||
runs-on: ubuntu-latest
|
python -m pip install --disable-pip-version-check tox tox-gh-actions
|
||||||
steps:
|
- name: "Run tests"
|
||||||
- uses: actions/checkout@v2
|
run: |
|
||||||
- uses: psf/black@stable
|
python -m tox
|
||||||
|
|
18
tox.ini
18
tox.ini
|
@ -25,7 +25,7 @@ deps =
|
||||||
all_platforms: coverage
|
all_platforms: coverage
|
||||||
|
|
||||||
commands =
|
commands =
|
||||||
all_platforms: coverage run -m pytest
|
all_platforms: coverage run -m pytest tests/
|
||||||
most_platforms: pytest tests/
|
most_platforms: pytest tests/
|
||||||
|
|
||||||
|
|
||||||
|
@ -78,3 +78,19 @@ source =
|
||||||
|
|
||||||
[coverage:html]
|
[coverage:html]
|
||||||
directory = htmlcov
|
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
|
||||||
|
|
Loading…
Reference in a new issue