forked from gnocchixyz/gnocchi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
161 lines (147 loc) · 5.3 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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
[tox]
minversion = 3.1
envlist = {py39,py311}-{postgresql,mysql}{,-file,-file-sqlalchemy14,-swift,-ceph,-s3},pep8
skipsdist = True
[testenv]
sitepackages = True
passenv =
LANG
GNOCCHI_TEST_*
AWS_*
setenv =
GNOCCHI_TEST_STORAGE_DRIVER=file
GNOCCHI_TEST_INDEXER_DRIVER=postgresql
GNOCCHI_TEST_STORAGE_DRIVERS=file swift ceph s3 redis
GNOCCHI_TEST_INDEXER_DRIVERS=postgresql mysql
file: GNOCCHI_TEST_STORAGE_DRIVERS=file
file-sqlalchemy14: GNOCCHI_TEST_STORAGE_DRIVERS=file
swift: GNOCCHI_TEST_STORAGE_DRIVERS=swift
ceph: GNOCCHI_TEST_STORAGE_DRIVERS=ceph
redis: GNOCCHI_TEST_STORAGE_DRIVERS=redis
s3: GNOCCHI_TEST_STORAGE_DRIVERS=s3
postgresql: GNOCCHI_TEST_INDEXER_DRIVERS=postgresql
mysql: GNOCCHI_TEST_INDEXER_DRIVERS=mysql
GNOCCHI_STORAGE_DEPS=file,swift,test-swift,s3,ceph,redis
ceph: GNOCCHI_STORAGE_DEPS=ceph
swift: GNOCCHI_STORAGE_DEPS=swift,test-swift
file: GNOCCHI_STORAGE_DEPS=file
file-sqlalchemy14: GNOCCHI_STORAGE_DEPS=file
redis: GNOCCHI_STORAGE_DEPS=redis
s3: GNOCCHI_STORAGE_DEPS=s3
GNOCCHI_INDEXER_DEPS=mysql,postgresql
mysql: GNOCCHI_INDEXER_DEPS=mysql
postgresql: GNOCCHI_INDEXER_DEPS=postgresql
# FIXME(sileht): pbr doesn't support url in setup.cfg extras, so we do this crap
GNOCCHI_TEST_TARBALLS=http://tarballs.openstack.org/swift/swift-master.tar.gz#egg=swift
ceph: GNOCCHI_TEST_TARBALLS=
swift: GNOCCHI_TEST_TARBALLS=http://tarballs.openstack.org/swift/swift-master.tar.gz#egg=swift
s3: GNOCCHI_TEST_TARBALLS=
redis: GNOCCHI_TEST_TARBALLS=
file: GNOCCHI_TEST_TARBALLS=
file-sqlalchemy14: GNOCCHI_TEST_TARBALLS=
# NOTE(jd) Install redis as a test dependency since it is used as a
# coordination driver in functional tests (--coordination-driver is passed to
# pifpaf)
deps =
.[test,redis,prometheus,amqp1,{env:GNOCCHI_STORAGE_DEPS:},{env:GNOCCHI_INDEXER_DEPS:}]
{env:GNOCCHI_TEST_TARBALLS:}
# TODO(tobias-urdin): Remove this pin and use pifpaf directly instead when this is
# merged and released
git+https://github.com/jd/pifpaf@d5103d4bcf80aa6f74e31e92e4a7eb92997d4c73
cliff!=2.9.0
gnocchiclient>=2.8.0,!=7.0.7
commands =
{toxinidir}/run-tests.sh {posargs}
{toxinidir}/run-func-tests.sh {posargs}
allowlist_externals =
{toxinidir}/run-tests.sh
{toxinidir}/run-func-tests.sh
[testenv:{py38,py39,py311}-{postgresql,mysql}-file-sqlalchemy14]
deps =
{[testenv]deps}
sqlalchemy<2
[testenv:{py39,py311}-postgresql-file-upgrade-from-4.4]
# We should always recreate since the script upgrade
# Gnocchi we can't reuse the virtualenv
recreate = True
setenv =
GNOCCHI_VERSION_FROM=stable/4.4
GNOCCHI_VARIANT=test,postgresql,file
deps =
# TODO(tobias-urdin): Remove this pin and use pifpaf directly instead when this is
# merged and released
git+https://github.com/jd/pifpaf@d5103d4bcf80aa6f74e31e92e4a7eb92997d4c73
gnocchiclient>=2.8.0,!=7.0.7
xattr!=0.9.4
commands = {toxinidir}/run-upgrade-tests.sh postgresql-file
allowlist_externals = {toxinidir}/run-upgrade-tests.sh
[testenv:{py39,py311}-mysql-ceph-upgrade-from-4.4]
# We should always recreate since the script upgrade
# Gnocchi we can't reuse the virtualenv
recreate = True
setenv =
GNOCCHI_VERSION_FROM=stable/4.4
GNOCCHI_VARIANT=test,mysql,ceph,ceph_recommended_lib
deps =
# TODO(tobias-urdin): Remove this pin and use pifpaf directly instead when this is
# merged and released
git+https://github.com/jd/pifpaf@d5103d4bcf80aa6f74e31e92e4a7eb92997d4c73
gnocchiclient>=2.8.0,!=7.0.7
xattr!=0.9.4
commands = {toxinidir}/run-upgrade-tests.sh mysql-ceph
allowlist_externals = {toxinidir}/run-upgrade-tests.sh
[testenv:build]
deps = build
commands = python -m build
[testenv:pep8]
deps = hacking>=3.2.0,<4.0.0
commands = flake8 {posargs}
allowlist_externals =
/usr/bin/flake8
[testenv:{py39,py311}-cover]
setenv =
{[testenv]setenv}
PYTHON=coverage run --source gnocchi --parallel-mode
commands =
coverage erase
stestr run {posargs}
stestr --test-path=./gnocchi/tests run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report
pifpaf -g GNOCCHI_INDEXER_URL run postgresql -- stestr --test-path=./gnocchi/tests run
coverage report
[flake8]
exclude = .tox,.local,.eggs,doc,gnocchi/rest/prometheus/remote_pb2.py,gnocchi/indexer/alembic/versions/
show-source = true
enable-extensions = H904
ignore = E501,E731,W503,W504
[testenv:docs]
## This does not work, see: https://github.com/tox-dev/tox/issues/509
# deps = {[testenv]deps}
# .[postgresql,doc]
# setenv = GNOCCHI_STORAGE_DEPS=file
deps =
.[test,file,postgresql,doc]
doc8
setenv =
GNOCCHI_TEST_DEBUG=1
commands =
doc8 --ignore-path doc/source/rest.rst,doc/source/comparison-table.rst doc/source
pifpaf -g GNOCCHI_INDEXER_URL run postgresql -- sphinx-build -W --keep-going -b html -j auto doc/source doc/build/html
[testenv:docs-gnocchi-web]
allowlist_externals =
/bin/bash
/bin/rm
setenv =
GNOCCHI_STORAGE_DEPS=file
GNOCCHI_TEST_DEBUG=1
deps =
{[testenv:docs]deps}
setuptools
commands =
/bin/rm -rf doc/build/html
pifpaf -g GNOCCHI_INDEXER_URL run postgresql -- sphinx-build -W --keep-going -b html -j auto doc/source doc/build/html
[doc8]
ignore-path = doc/source/rest.rst,doc/source/comparison-table.rst