-
Notifications
You must be signed in to change notification settings - Fork 2
/
tox.ini
135 lines (120 loc) · 3.14 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# Copyright 2023 Jason C. Nucciarone
# See LICENSE file for licensing details.
[tox]
skipsdist=True
skip_missing_interpreters = True
envlist = fmt, lint
[vars]
src_path = {toxinidir}/src
tst_path = {toxinidir}/tests
docs_path = {toxinidir}/docs
all_path = {[vars]src_path} {[vars]tst_path} {[vars]docs_path} {toxinidir}/.github {toxinidir}/CODE_OF_CONDUCT.md {toxinidir}/README.md {toxinidir}/CONTRIBUTING.md
all_code_path = {[vars]src_path} {[vars]tst_path}
[testenv]
basepython = python3
setenv =
PYTHONPATH = {toxinidir}:{[vars]src_path}
PYTHONBREAKPOINT=ipdb.set_trace
PY_COLORS=1
passenv =
PYTHONPATH
[testenv:fmt]
description = Apply coding style standards to code.
deps =
black
ruff
commands =
black {[vars]all_code_path}
ruff --fix {[vars]all_code_path}
[testenv:lint]
description = Check code against coding style standards.
deps =
black
ruff
codespell
commands =
codespell {[vars]all_path}
ruff {[vars]all_code_path}
black --check --diff {[vars]all_code_path}
[testenv:functional]
description = Run cleantest functional tests/
deps =
-r {toxinidir}/requirements.txt
jinja2
pytest
pytest-cov
commands =
pytest --cov={[vars]src_path} --tb native --log-cli-level=INFO \
{[vars]tst_path}/functional
[testenv:docs]
description = Serve cleantest documentation locally.
deps =
mkdocs
mkdocs-material
commands =
mkdocs serve
[testenv:build-docs]
description = Build cleantest documentation.
deps =
mkdocs
mkdocs-material
commands =
mkdocs build
[testenv:publish-docs]
description = Publish cleantest documentation to GitHub Pages.
deps =
mkdocs
mkdocs-material
commands =
mkdocs gh-deploy
[testenv:publish]
description = Publish cleantest to PyPI.
deps =
twine
setuptools
wheel
commands =
rm -rf {toxinidir}/dist
python setup.py sdist bdist_wheel
twine upload {toxinidir}/dist/*
[testenv:lxd-local]
description = Run functional tests for a locally-hosted LXD cluster.
deps =
-r {toxinidir}/requirements.txt
pytest
commands =
pytest -v --tb native --log-cli-level=INFO \
{[vars]tst_path}/functional/lxd/local
[testenv:lxd-local-parallel]
description = Run functional tests in parallel for a locally-hosted LXD cluster.
deps =
-r {toxinidir}/requirements.txt
pytest
commands =
pytest -v --tb native --log-cli-level=INFO \
{[vars]tst_path}/functional/lxd/parallel
[testenv:lxd-archon]
description = Run functional tests for LXD archon
deps =
-r {toxinidir}/requirements.txt
jinja2
pytest
commands =
pytest -v --tb native --log-cli-level=INFO \
{[vars]tst_path}/functional/lxd/archon
[testenv:snaps]
description = Run functional tests to test if cleantest supports snap packages
deps =
-r {toxinidir}/requirements.txt
pytest
commands =
pytest -v --tb native --log-cli-level=INFO \
{[vars]tst_path}/functional/packages/snap
[testenv:files]
description = Run functional tests to test file and directory injections.
deps =
-r {toxinidir}/requirements.txt
pytest
commands =
pytest -v --tb native --log-cli-level=INFO \
{[vars]tst_path}/functional/files