blob: bed67e162d46fdf5d78b246a512c351f6f4a257a [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
Oleksandr K.783acea2024-10-04 17:52:17 +020014 ATMOSPHERE_*
Mohammed Naserf75ab072024-04-02 12:55:10 -040015
16[testenv:venv]
17passenv =
Oleksandr K.783acea2024-10-04 17:52:17 +020018 ATMOSPHERE_*
19 OS_*
Mohammed Naserf75ab072024-04-02 12:55:10 -040020commands =
21 {posargs}
Mohammed Naserdc087392024-04-01 20:26:02 -040022
Mohammed Nasereb257cb2024-04-10 21:14:24 -040023[testenv:pin-digests]
24deps =
25 oslo_config
26 oslo_log
27 ruyaml
28commands =
29 python3 {toxinidir}/build/pin-images.py roles/defaults/vars/main.yml roles/defaults/vars/main.yml
30
Mohammed Naser2fd39612024-04-14 13:37:45 -040031[testenv:linters]
32skipsdist = True
33deps =
Mohammed Naser2fd39612024-04-14 13:37:45 -040034 pre-commit
35commands =
36 pre-commit run --all-files --show-diff-on-failure
vexxhost-bot0c1bdf92024-06-20 14:17:20 +020037 python3 {toxinidir}/build/lint-jobs.py
Mohammed Naser2fd39612024-04-14 13:37:45 -040038
Mohammed Naser2be5ecd2024-07-19 00:38:45 -040039[testenv:py3]
40deps =
41 pytest-ansible
42commands =
43 pytest tests/unit
44
45[testenv:molecule-venv]
46passenv =
Oleksandr K.783acea2024-10-04 17:52:17 +020047 ATMOSPHERE_*
48 OS_*
Mohammed Naser2be5ecd2024-07-19 00:38:45 -040049deps =
50 molecule
Mohammed Naserad89dc32024-07-22 22:36:14 -040051 kubernetes
52 oslotest
53 stestr
54 testscenarios
Mohammed Naser2be5ecd2024-07-19 00:38:45 -040055commands =
56 molecule {posargs}
57
Mohammed Naserdc087392024-04-01 20:26:02 -040058[testenv:molecule-keycloak]
Mohammed Naser2be5ecd2024-07-19 00:38:45 -040059deps =
60 {[testenv:molecule-venv]deps}
Mohammed Naserdc087392024-04-01 20:26:02 -040061commands =
62 molecule test -s keycloak
63
64[testenv:molecule-csi-{rbd,local-path-provisioner}]
Mohammed Naser2be5ecd2024-07-19 00:38:45 -040065deps =
66 {[testenv:molecule-venv]deps}
Mohammed Naserdc087392024-04-01 20:26:02 -040067setenv =
68 rbd: MOLECULE_CSI_DRIVER = rbd
69 local-path-provisioner: MOLECULE_CSI_DRIVER = local-path-provisioner
70commands =
71 molecule test -s csi
72
73[testenv:molecule-aio-{openvswitch,ovn}]
Mohammed Naser2be5ecd2024-07-19 00:38:45 -040074deps =
75 {[testenv:molecule-venv]deps}
Mohammed Naserdc087392024-04-01 20:26:02 -040076setenv =
Mohammed Naser7e5ec812024-04-03 13:56:11 -040077 ATMOSPHERE_DEBUG = false
Mohammed Naserdc087392024-04-01 20:26:02 -040078 openvswitch: ATMOSPHERE_NETWORK_BACKEND = openvswitch
79 ovn: ATMOSPHERE_NETWORK_BACKEND = ovn
80commands =
81 molecule test -s aio
Mohammed Naser90128aa2024-04-29 13:21:58 -040082
83[testenv:docs]
84envdir = {toxworkdir}/docs
85deps =
86 -r{toxinidir}/doc/requirements.txt
87allowlist_externals =
88 rm
89commands =
90 rm -rf doc/build/html doc/build/doctrees
91 sphinx-build -W --keep-going -b html -j auto doc/source doc/build/html
92
93[testenv:docs-serve]
94envdir = {[testenv:docs]envdir}
95deps = {[testenv:docs]deps}
96allowlist_externals = {[testenv:docs]allowlist_externals}
97commands =
98 rm -rf doc/build/html doc/build/doctrees
99 sphinx-autobuild doc/source doc/build/html
Mohammed Naser2be5ecd2024-07-19 00:38:45 -0400100
101[testenv:build-manila-image]
102deps =
103 diskimage-builder==3.28.0
104allowlist_externals =
105 bash
106commands =
107 bash {toxinidir}/build/build-manila-image.sh