blob: fcfaae8cb0b62371e41ddc3d383a6cb2ffd7f1b1 [file] [log] [blame]
Mohammed Naserdc087392024-04-01 20:26:02 -04001[tox]
2minversion = 4
Mohammed Naserdc087392024-04-01 20:26:02 -04003
Mohammed Naserf75ab072024-04-02 12:55:10 -04004[testenv]
5usedevelop = True
6setenv =
7 VIRTUAL_ENV={envdir}
Mohammed Naserf75ab072024-04-02 12:55:10 -04008 OS_STDOUT_CAPTURE=1
9 OS_STDERR_CAPTURE=1
10 OS_TEST_TIMEOUT=160
11 PYTHONDONTWRITEBYTECODE=1
Mohammed Naserf75ab072024-04-02 12:55:10 -040012passenv =
13 KUBECONFIG
Rico Linf2ad2892024-08-17 05:05:09 +080014 ATMOSPHERE_*
Mohammed Naserf75ab072024-04-02 12:55:10 -040015
16[testenv:venv]
17passenv =
Rico Linf2ad2892024-08-17 05:05:09 +080018 ATMOSPHERE_*
19 OS_*
Mohammed Naserf75ab072024-04-02 12:55:10 -040020commands =
21 {posargs}
Mohammed Naserdc087392024-04-01 20:26:02 -040022
Mohammed Naser2fd39612024-04-14 13:37:45 -040023[testenv:linters]
24skipsdist = True
25deps =
Mohammed Naser2fd39612024-04-14 13:37:45 -040026 pre-commit
27commands =
28 pre-commit run --all-files --show-diff-on-failure
Mohammed Naser2fd39612024-04-14 13:37:45 -040029
Mohammed Naser6080c9b2024-07-18 10:43:09 -040030[testenv:py3]
31deps =
32 pytest-ansible
33commands =
34 pytest tests/unit
35
36[testenv:molecule-venv]
37passenv =
Rico Linf2ad2892024-08-17 05:05:09 +080038 ATMOSPHERE_*
39 OS_*
Mohammed Naser6080c9b2024-07-18 10:43:09 -040040deps =
Oleksandr K.24c88fd2024-12-08 22:28:50 -080041 molecule==24.9.0
Mohammed Naserc04b1b02025-01-14 16:35:33 -050042 ansible-compat==24.10.0
Mohammed Naser4569e9b2024-07-19 01:08:18 -040043 kubernetes
Mohammed Naser5be7cb52024-07-22 16:20:13 -040044 oslotest
45 stestr
46 testscenarios
Mohammed Naser6080c9b2024-07-18 10:43:09 -040047commands =
48 molecule {posargs}
49
Mohammed Naserdc087392024-04-01 20:26:02 -040050[testenv:molecule-keycloak]
Mohammed Naser6080c9b2024-07-18 10:43:09 -040051deps =
52 {[testenv:molecule-venv]deps}
Mohammed Naserdc087392024-04-01 20:26:02 -040053commands =
54 molecule test -s keycloak
55
56[testenv:molecule-csi-{rbd,local-path-provisioner}]
Mohammed Naser6080c9b2024-07-18 10:43:09 -040057deps =
58 {[testenv:molecule-venv]deps}
Mohammed Naserdc087392024-04-01 20:26:02 -040059setenv =
60 rbd: MOLECULE_CSI_DRIVER = rbd
61 local-path-provisioner: MOLECULE_CSI_DRIVER = local-path-provisioner
62commands =
63 molecule test -s csi
64
65[testenv:molecule-aio-{openvswitch,ovn}]
Mohammed Naser6080c9b2024-07-18 10:43:09 -040066deps =
67 {[testenv:molecule-venv]deps}
Mohammed Naserdc087392024-04-01 20:26:02 -040068setenv =
Mohammed Naser7e5ec812024-04-03 13:56:11 -040069 ATMOSPHERE_DEBUG = false
Mohammed Naserdc087392024-04-01 20:26:02 -040070 openvswitch: ATMOSPHERE_NETWORK_BACKEND = openvswitch
71 ovn: ATMOSPHERE_NETWORK_BACKEND = ovn
72commands =
Oleksandr K.170ae762024-10-29 17:18:35 +010073 molecule test -s aio {posargs}
Mohammed Naser90128aa2024-04-29 13:21:58 -040074
75[testenv:docs]
76envdir = {toxworkdir}/docs
77deps =
78 -r{toxinidir}/doc/requirements.txt
79allowlist_externals =
80 rm
Mohammed Naser7607e5a2025-01-16 01:54:26 -050081skip_install = true
Mohammed Naser90128aa2024-04-29 13:21:58 -040082commands =
83 rm -rf doc/build/html doc/build/doctrees
84 sphinx-build -W --keep-going -b html -j auto doc/source doc/build/html
85
86[testenv:docs-serve]
87envdir = {[testenv:docs]envdir}
88deps = {[testenv:docs]deps}
89allowlist_externals = {[testenv:docs]allowlist_externals}
Mohammed Naser7607e5a2025-01-16 01:54:26 -050090skip_install = {[testenv:docs]skip_install}
Mohammed Naser90128aa2024-04-29 13:21:58 -040091commands =
92 rm -rf doc/build/html doc/build/doctrees
93 sphinx-autobuild doc/source doc/build/html
Mohammed Naser6080c9b2024-07-18 10:43:09 -040094
95[testenv:build-manila-image]
96deps =
97 diskimage-builder==3.28.0
98allowlist_externals =
99 bash
100commands =
101 bash {toxinidir}/build/build-manila-image.sh
Dong Mafa5d2442024-10-30 10:29:16 +0800102
103[testenv:promtool-test]
104skip_install = true
105deps =
106 PyYAML
107 rjsonnet
108commands =
109 python3 {toxinidir}/hack/promtool-test.py
Dong Ma0a05b5c2024-11-24 13:27:29 +0800110
111[testenv:helm-unittest]
112commands =
113 python3 {toxinidir}/hack/helm-unittest.py
Mohammed Naser7607e5a2025-01-16 01:54:26 -0500114
115[testenv:generate-releasenotes]
116skip_install = true
117deps =
118 reno
119commands =
120 reno report --output {toxinidir}/CHANGELOG.rst