/ tox.ini
tox.ini
 1  [tox]
 2  envlist =
 3      lint,
 4      py{37,38,39,310,311},
 5      docs
 6  
 7  [gh-actions]
 8  # this make sure each ci job only run tests once.
 9  # keey it sync with workflows/ci.yaml matrix
10  python =
11      3.7: py37
12      3.8: py38
13      3.9: py39
14      3.10: py310
15      3.11: py311
16  
17  [testenv]
18  deps = -rrequirements/test.txt
19  commands = pytest --cov=github --cov-report=xml {posargs}
20  
21  [testenv:lint]
22  basepython = python3.8
23  skip_install = true
24  deps =
25      -r requirements/types.txt
26      pre-commit
27  commands =
28      pre-commit run --all-files --show-diff-on-failure
29      ; Run mypy outside pre-commit because pre-commit runs mypy in a venv
30      ; that doesn't have dependencies or their type annotations installed.
31      mypy github tests
32  
33  [testenv:docs]
34  basepython = python3.8
35  skip_install = true
36  deps = -rrequirements.txt
37  commands = sphinx-build doc build