forked from whonore/Coqtail
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
95 lines (86 loc) · 2.22 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
[tox]
skipsdist = true
envlist = {unit, coq}-py{36}, vim
[pybase]
description = Pytest configuration
setenv = PYTHONPATH = python
deps =
pytest
[testenv:unit-py{36}]
description = Python unit tests
setenv = {[pybase]setenv}
deps = {[pybase]deps}
commands = python -m pytest -q tests/unit {posargs}
[testenv:coq{,84,85,86,87,88,89,810,811,812,813,814,815,816,817,818,819,master}-py{36}]
description = Coq integration tests
setenv =
{[pybase]setenv}
!coq: COQBIN = {envtmpdir}/coq/bin
passenv =
COQBIN
HOME
NIX_PATH
deps = {[pybase]deps}
allowlist_externals =
!coq: nix-build
commands_pre =
!coq: nix-build -j auto --cores 0 {toxinidir}/ci/coq.nix --argstr tox_version {envname} -o {envtmpdir}/coq
commands = python -m pytest -q tests/coq {posargs}
[testenv:vim]
description = Vim unit tests
changedir = {toxinidir}/tests/vim
passenv = HOME
commands = ./run.sh
[devbase]
description = Common dev dependencies
basepython = python3.10
envdir = {toxworkdir}/3
passenv = PYLINTHOME
deps =
flake8
flake8-bugbear
pylint
black
isort[colors]
mypy
typing_extensions
; Needed for type information
pytest
[testenv:lint]
description = Lint code
basepython = {[devbase]basepython}
envdir = {[devbase]envdir}
deps = {[devbase]deps}
passenv = {[devbase]passenv}
commands =
python -m flake8 python/ tests/
python -m pylint python/ tests/
[testenv:format]
description = Format code
basepython = {[devbase]basepython}
envdir = {[devbase]envdir}
deps = {[devbase]deps}
passenv = {[devbase]passenv}
commands =
python -m black --target-version=py36 python/ tests/
python -m isort python/ tests/
[testenv:mypy]
description = Typecheck code
basepython = {[devbase]basepython}
envdir = {[devbase]envdir}
deps = {[devbase]deps}
passenv = {[devbase]passenv}
commands =
python -m mypy python/ tests/
[testenv:check-all]
description = Check formatting, types, and linters
basepython = {[devbase]basepython}
envdir = {[devbase]envdir}
deps = {[devbase]deps}
passenv = {[devbase]passenv}
commands =
python -m black --target-version=py36 --check python/ tests/
python -m isort --check python/ tests/
python -m mypy python/ tests/
python -m flake8 python/ tests/
python -m pylint python/ tests/