[tox] minversion = 2.4 envlist = py{37,27}-{postgresql,mysql}{,-file,-swift,-ceph,-s3},pep8 skipsdist = True [testenv] skip_install = True sitepackages = False 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 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 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= # 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 = -e .[test,redis,prometheus,amqp1,{env:GNOCCHI_STORAGE_DEPS:},{env:GNOCCHI_INDEXER_DEPS:}] {env:GNOCCHI_TEST_TARBALLS:} cliff!=2.9.0 commands = {toxinidir}/run-tests.sh {posargs} {toxinidir}/run-func-tests.sh {posargs} [testenv:py37-postgresql-file-upgrade-from-4.3] # We should always recreate since the script upgrade # Gnocchi we can't reuse the virtualenv recreate = True setenv = GNOCCHI_VARIANT=test,postgresql,file deps = gnocchi[{env:GNOCCHI_VARIANT}]>=4.3,<4.4 pifpaf[gnocchi]>=0.13 gnocchiclient>=2.8.0 xattr!=0.9.4 commands = pifpaf --env-prefix INDEXER run postgresql {toxinidir}/run-upgrade-tests.sh {posargs} [testenv:py27-mysql-ceph-upgrade-from-4.3] # We should always recreate since the script upgrade # Gnocchi we can't reuse the virtualenv recreate = True setenv = GNOCCHI_VARIANT=test,mysql,ceph,ceph_recommended_lib deps = gnocchi[{env:GNOCCHI_VARIANT}]>=4.3,<4.4 gnocchiclient>=2.8.0 pifpaf[ceph,gnocchi]>=0.13 xattr!=0.9.4 commands = pifpaf --env-prefix INDEXER run mysql -- pifpaf --env-prefix STORAGE run ceph {toxinidir}/run-upgrade-tests.sh {posargs} [testenv:pep8] deps = hacking>=0.12,<0.13 commands = flake8 [testenv:py27-cover] commands = pifpaf -g GNOCCHI_INDEXER_URL run postgresql -- python setup.py testr --coverage --testr-args="{posargs}" [flake8] exclude = .tox,.eggs,doc,gnocchi/rest/prometheus/remote_pb2.py show-source = true enable-extensions = H904 [testenv:docs] basepython = python3 ## This does not work, see: https://github.com/tox-dev/tox/issues/509 # deps = {[testenv]deps} # .[postgresql,doc] # setenv = GNOCCHI_STORAGE_DEPS=file deps = -e .[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 -- python setup.py build_sphinx -W [testenv:docs-gnocchi.xyz] basepython = python2.7 whitelist_externals = bash rm setenv = GNOCCHI_STORAGE_DEPS=file GNOCCHI_TEST_DEBUG=1 install_command = pip install -U {opts} {packages} deps = {[testenv:docs]deps} setuptools commands = rm -rf doc/build/html pifpaf -g GNOCCHI_INDEXER_URL run postgresql -- python setup.py build_sphinx [doc8] ignore-path = doc/source/rest.rst,doc/source/comparison-table.rst