Skip to content

Commit

Permalink
update tox config for v4, update tests workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
davidism committed Jan 29, 2023
1 parent 3b0d3c2 commit 3b9965a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,31 @@ jobs:
fail-fast: false
matrix:
include:
- {name: '3.11', python: '3.11', tox: py311}
- {name: 'Lowest', python: '3.11', tox: py311-lowest}
- {name: '3.10', python: '3.10', tox: py310}
- {name: 'Lowest', python: '3.10', tox: py310-lowest}
- {name: '3.9', python: '3.9', tox: py39}
- {name: '3.8', python: '3.8', tox: py38}
- {name: '3.7', python: '3.7', tox: py37}
- {name: 'Typing', python: '3.10', os: ubuntu-latest, tox: typing}
- {name: 'Typing', python: '3.11', os: ubuntu-latest, tox: typing}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
- uses: actions/setup-python@5ccb29d8773c3f3f653e1705f474dfaa8a06a912
with:
python-version: ${{ matrix.python }}
cache: 'pip'
cache-dependency-path: 'pdm.lock'
- uses: actions/cache@v3
- uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12
with:
path: ~/.cache/pdm
key: ${{ matrix.python }}-pdm-${{ hashFiles('pdm.lock') }}
restore-keys: ${{ matrix.python }}-pdm-
- name: cache mypy
uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12
with:
path: ./.mypy_cache
key: mypy|${{ matrix.python }}|${{ hashFiles('pyproject.toml') }}
if: matrix.tox == 'typing'
- run: |
pip install pdm
pdm config install.cache true
Expand Down
13 changes: 9 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
[tox]
envlist =
py3{11,10,9,8,7}
pypy3{9,8,7}
py310-lowest
pypy39
py311-lowest
style
typing
docs
skip_missing_interpreters = true
isolated_build = true

[testenv]
package = wheel
wheel_build_env = .pkg
groups = tests
deps =
lowest: flask==2.2
Expand All @@ -19,12 +20,16 @@ commands = pytest -v --tb=short --basetemp={envtmpdir} {posargs}
[testenv:style]
groups = pre-commit
skip_install = true
commands = pre-commit run --all-files --show-diff-on-failure
commands = pre-commit run --all-files

[testenv:typing]
package = wheel
wheel_build_env = .pkg
groups = mypy
commands = mypy

[testenv:docs]
package = wheel
wheel_build_env = .pkg
groups = docs
commands = sphinx-build -W -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html

0 comments on commit 3b9965a

Please sign in to comment.