blob: 6e55c35e6f6f901bc8f71086fea95ceb4d047259 [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
14
15[testenv:venv]
16passenv =
17 ATMOSPHERE_NETWORK_BACKEND
18commands =
19 {posargs}
Mohammed Naserdc087392024-04-01 20:26:02 -040020
Mohammed Nasereb257cb2024-04-10 21:14:24 -040021[testenv:pin-digests]
22deps =
23 oslo_config
24 oslo_log
25 ruyaml
26commands =
27 python3 {toxinidir}/build/pin-images.py roles/defaults/vars/main.yml roles/defaults/vars/main.yml
28
Mohammed Naser2fd39612024-04-14 13:37:45 -040029[testenv:sync-charts]
30skipsdist = True
31deps =
Mohammed Naser594ffbd2024-07-30 22:57:10 -040032 chart-vendor
Mohammed Naser2fd39612024-04-14 13:37:45 -040033commands =
Mohammed Naser594ffbd2024-07-30 22:57:10 -040034 chart-vendor
Mohammed Naser2fd39612024-04-14 13:37:45 -040035
36[testenv:linters]
37skipsdist = True
38deps =
39 {[testenv:sync-charts]deps}
40 pre-commit
41commands =
42 pre-commit run --all-files --show-diff-on-failure
Mohammed Naser594ffbd2024-07-30 22:57:10 -040043 chart-vendor --check
Mohammed Naser72708702024-06-20 00:07:56 -040044 python3 {toxinidir}/build/lint-jobs.py
Mohammed Naser2fd39612024-04-14 13:37:45 -040045
Mohammed Naser6080c9b2024-07-18 10:43:09 -040046[testenv:py3]
47deps =
48 pytest-ansible
49commands =
50 pytest tests/unit
51
52[testenv:molecule-venv]
53passenv =
54 ATMOSPHERE_NETWORK_BACKEND
55deps =
56 molecule
Mohammed Naser4569e9b2024-07-19 01:08:18 -040057 kubernetes
Mohammed Naser5be7cb52024-07-22 16:20:13 -040058 oslotest
59 stestr
60 testscenarios
Mohammed Naser6080c9b2024-07-18 10:43:09 -040061commands =
62 molecule {posargs}
63
Mohammed Naserdc087392024-04-01 20:26:02 -040064[testenv:molecule-keycloak]
Mohammed Naser6080c9b2024-07-18 10:43:09 -040065deps =
66 {[testenv:molecule-venv]deps}
Mohammed Naserdc087392024-04-01 20:26:02 -040067commands =
68 molecule test -s keycloak
69
70[testenv:molecule-csi-{rbd,local-path-provisioner}]
Mohammed Naser6080c9b2024-07-18 10:43:09 -040071deps =
72 {[testenv:molecule-venv]deps}
Mohammed Naserdc087392024-04-01 20:26:02 -040073setenv =
74 rbd: MOLECULE_CSI_DRIVER = rbd
75 local-path-provisioner: MOLECULE_CSI_DRIVER = local-path-provisioner
76commands =
77 molecule test -s csi
78
79[testenv:molecule-aio-{openvswitch,ovn}]
Mohammed Naser6080c9b2024-07-18 10:43:09 -040080deps =
81 {[testenv:molecule-venv]deps}
Mohammed Naserdc087392024-04-01 20:26:02 -040082setenv =
Mohammed Naser7e5ec812024-04-03 13:56:11 -040083 ATMOSPHERE_DEBUG = false
Mohammed Naserdc087392024-04-01 20:26:02 -040084 openvswitch: ATMOSPHERE_NETWORK_BACKEND = openvswitch
85 ovn: ATMOSPHERE_NETWORK_BACKEND = ovn
86commands =
87 molecule test -s aio
Mohammed Naser90128aa2024-04-29 13:21:58 -040088
89[testenv:docs]
90envdir = {toxworkdir}/docs
91deps =
92 -r{toxinidir}/doc/requirements.txt
93allowlist_externals =
94 rm
95commands =
96 rm -rf doc/build/html doc/build/doctrees
97 sphinx-build -W --keep-going -b html -j auto doc/source doc/build/html
98
99[testenv:docs-serve]
100envdir = {[testenv:docs]envdir}
101deps = {[testenv:docs]deps}
102allowlist_externals = {[testenv:docs]allowlist_externals}
103commands =
104 rm -rf doc/build/html doc/build/doctrees
105 sphinx-autobuild doc/source doc/build/html
Mohammed Naser6080c9b2024-07-18 10:43:09 -0400106
107[testenv:build-manila-image]
108deps =
109 diskimage-builder==3.28.0
110allowlist_externals =
111 bash
112commands =
113 bash {toxinidir}/build/build-manila-image.sh