forked from whonore/Coqtail
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
86 lines (74 loc) · 2.2 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
[tox]
skipsdist = true
envlist = pytest-coq{84,85,86,87,88,89,810,811,master}-py{27,36}, vim
[testenv]
whitelist_externals =
pytest: nix-build
pytest,vim: sh
vim: git
vim: vim
passenv =
pytest: NIX_PATH
pytest: HOME
setenv =
pytest: PATH = {envtmpdir}/coq/bin{:}{env:PATH}
pytest: PYTHONPATH = python
deps =
pytest
mock
commands_pre =
coq{84,85,86,87,88,89,810,811,master}: {toxinidir}/ci/install-coq.sh {envname} {envtmpdir}
vim: git clone https://github.com/junegunn/vader.vim {envtmpdir}/vader.vim
vim: git clone https://github.com/let-def/vimbufsync {envtmpdir}/vimbufsync
commands =
; setenv doesn't seem to be enough to pick up the right Coq version
pytest: sh -c 'PATH={env:PATH} {envpython} -m pytest -q {posargs}'
vim: sh -c 'echo "filetype off | set rtp+={envtmpdir}/vader.vim | set rtp+={envtmpdir}/vimbufsync | set rtp+=. | filetype plugin indent on | syntax enable" > {envtmpdir}/vimrc'
vim: vim -Nu {envtmpdir}/vimrc -c 'Vader! tests/*.vader'
[testenv:devbase]
description = Common dev dependencies
deps =
flake8
flake8-import-order
pylint
[testenv:devbase-3]
description = Extra dev dependencies for py3
deps =
{[testenv:devbase]deps}
flake8-bugbear
black
mypy
[testenv:lint]
description = Lint code
whitelist_externals = sh
commands =
- python -m flake8 python/
- sh -c '{envpython} -m pylint python/*.py'
[testenv:lint-2]
description = Lint code with py2
whitelist_externals = {[testenv:lint]whitelist_externals}
basepython = python2
envdir = {toxworkdir}/2
deps = {[testenv:devbase]deps}
commands = {[testenv:lint]commands}
[testenv:lint-3]
description = Lint code with py3
whitelist_externals = {[testenv:lint]whitelist_externals}
basepython = python3
envdir = {toxworkdir}/3
deps = {[testenv:devbase-3]deps}
commands = {[testenv:lint]commands}
[testenv:black]
description = Format code
basepython = python3
envdir = {toxworkdir}/3
deps = {[testenv:devbase-3]deps}
commands = python -m black --exclude six.py python/ tests/
[testenv:mypy]
description = Typecheck code
basepython = python3
envdir = {toxworkdir}/3
deps = {[testenv:devbase-3]deps}
commands =
- python -m mypy -2 python/
- python -m mypy python/