-
Notifications
You must be signed in to change notification settings - Fork 30
/
tox.ini
99 lines (85 loc) · 2.65 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
96
97
98
99
[tox]
# As it may be undesired to make formatting changes, by default only check
envlist = ruff, format-check, mypy, pytest, pylint
skipsdist = true
[common]
envdir = {toxworkdir}/.testenv
deps =
mypy==0.950
pylint==2.13.9
ruff==0.4.3
types-mock==5.0.0
types-pyyaml==6.0.12
types-requests==2.31.0.6
types-setuptools==67.3.0
types-toml==0.10.8
-rrequirements.txt
-rtest-requirements.txt
[testenv:pytest]
envdir = {[common]envdir}
deps = {[common]deps}
commands = {envpython} -m pytest --doctest-modules --cov=pycloudlib --cov-branch {posargs:tests/unit_tests}
[testenv:mypy]
envdir = {[common]envdir}
deps =
{[common]deps}
commands = {envpython} -m mypy pycloudlib examples setup.py
[testenv:ruff]
envdir = {[common]envdir}
deps = {[common]deps}
commands = {envpython} -m ruff check -- pycloudlib examples setup.py
[testenv:pylint]
envdir = {[common]envdir}
deps = {[common]deps}
commands = {envpython} -m pylint --max-line-length=100 pycloudlib examples setup.py
[testenv:format-check]
envdir = {[common]envdir}
deps = {[common]deps}
commands = {envpython} -m ruff format --check -- .
[testenv:format]
envdir = {[common]envdir}
deps = {[common]deps}
commands =
{envpython} -m ruff format -- .
{envpython} -m ruff check --fix -- pycloudlib examples setup.py
[testenv:docs]
# Docs uses a separate environment because the changedir will
# cause tox to recreate the environment.
changedir = docs
deps =
-rrequirements.txt
-rtest-requirements.txt
-rdocs/requirements.txt
commands = sphinx-build -M html "." "_build" -W
[tip]
envdir = {toxworkdir}/.testenv-tip
deps =
pylint
ruff
-rrequirements.txt
[testenv:tip-pylint]
envdir = {[tip]envdir}
deps = {[tip]deps}
commands = {envpython} -m pylint --max-line-length=100 pycloudlib examples setup.py
[testenv:tip-ruff]
envdir = {[tip]envdir}
deps = {[tip]deps}
commands = {envpython} -m ruff check -- pycloudlib examples setup.py
[testenv:integration-tests]
commands = {envpython} -m pytest --log-cli-level=INFO -svv {posargs:tests/integration_tests}
deps =
-rrequirements.txt
-rtest-requirements.txt
[testenv:integration-tests-ci]
commands = {envpython} -m pytest -m ci --log-cli-level=INFO -svv {posargs:tests/integration_tests}
deps =
-rrequirements.txt
-rtest-requirements.txt
pytest-xdist
[testenv:integration-tests-main-check]
# Since we can't use GH secrets from a forked PR, run the cloud-based
# tests after the branch has merged. Better late than never
commands = {envpython} -m pytest -n 5 -m main_check --log-cli-level=DEBUG -svv {posargs:tests/integration_tests}
deps = {[testenv:integration-tests-ci]deps}
passenv =
GOOGLE_APPLICATION_CREDENTIALS