blob: df03da0d81adff83502c6d961982fc8044dac08a [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 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:sync-charts]
32skipsdist = True
33deps =
Mohammed Naser594ffbd2024-07-30 22:57:10 -040034 chart-vendor
Mohammed Naser2fd39612024-04-14 13:37:45 -040035commands =
Mohammed Naser594ffbd2024-07-30 22:57:10 -040036 chart-vendor
Mohammed Naser2fd39612024-04-14 13:37:45 -040037
38[testenv:linters]
39skipsdist = True
40deps =
41 {[testenv:sync-charts]deps}
42 pre-commit
43commands =
44 pre-commit run --all-files --show-diff-on-failure
Mohammed Naser594ffbd2024-07-30 22:57:10 -040045 chart-vendor --check
Mohammed Naser72708702024-06-20 00:07:56 -040046 python3 {toxinidir}/build/lint-jobs.py
Mohammed Naser2fd39612024-04-14 13:37:45 -040047
Mohammed Naser6080c9b2024-07-18 10:43:09 -040048[testenv:py3]
49deps =
50 pytest-ansible
51commands =
52 pytest tests/unit
53
54[testenv:molecule-venv]
55passenv =
Rico Linf2ad2892024-08-17 05:05:09 +080056 ATMOSPHERE_*
57 OS_*
Mohammed Naser6080c9b2024-07-18 10:43:09 -040058deps =
59 molecule
Mohammed Naser4569e9b2024-07-19 01:08:18 -040060 kubernetes
Mohammed Naser5be7cb52024-07-22 16:20:13 -040061 oslotest
62 stestr
63 testscenarios
Mohammed Naser6080c9b2024-07-18 10:43:09 -040064commands =
65 molecule {posargs}
66
Mohammed Naserdc087392024-04-01 20:26:02 -040067[testenv:molecule-keycloak]
Mohammed Naser6080c9b2024-07-18 10:43:09 -040068deps =
69 {[testenv:molecule-venv]deps}
Mohammed Naserdc087392024-04-01 20:26:02 -040070commands =
71 molecule test -s keycloak
72
73[testenv:molecule-csi-{rbd,local-path-provisioner}]
Mohammed Naser6080c9b2024-07-18 10:43:09 -040074deps =
75 {[testenv:molecule-venv]deps}
Mohammed Naserdc087392024-04-01 20:26:02 -040076setenv =
77 rbd: MOLECULE_CSI_DRIVER = rbd
78 local-path-provisioner: MOLECULE_CSI_DRIVER = local-path-provisioner
79commands =
80 molecule test -s csi
81
82[testenv:molecule-aio-{openvswitch,ovn}]
Mohammed Naser6080c9b2024-07-18 10:43:09 -040083deps =
84 {[testenv:molecule-venv]deps}
Mohammed Naserdc087392024-04-01 20:26:02 -040085setenv =
Mohammed Naser7e5ec812024-04-03 13:56:11 -040086 ATMOSPHERE_DEBUG = false
Mohammed Naserdc087392024-04-01 20:26:02 -040087 openvswitch: ATMOSPHERE_NETWORK_BACKEND = openvswitch
88 ovn: ATMOSPHERE_NETWORK_BACKEND = ovn
89commands =
90 molecule test -s aio
Mohammed Naser90128aa2024-04-29 13:21:58 -040091
92[testenv:docs]
93envdir = {toxworkdir}/docs
94deps =
95 -r{toxinidir}/doc/requirements.txt
96allowlist_externals =
97 rm
98commands =
99 rm -rf doc/build/html doc/build/doctrees
100 sphinx-build -W --keep-going -b html -j auto doc/source doc/build/html
101
102[testenv:docs-serve]
103envdir = {[testenv:docs]envdir}
104deps = {[testenv:docs]deps}
105allowlist_externals = {[testenv:docs]allowlist_externals}
106commands =
107 rm -rf doc/build/html doc/build/doctrees
108 sphinx-autobuild doc/source doc/build/html
Mohammed Naser6080c9b2024-07-18 10:43:09 -0400109
110[testenv:build-manila-image]
111deps =
112 diskimage-builder==3.28.0
113allowlist_externals =
114 bash
115commands =
116 bash {toxinidir}/build/build-manila-image.sh