| [tox] |
| envlist = py{2.7,pypy,pypy3,3.4,3.5,3.6,3.7},checks,lint,pylint,integration,coverage |
| skipsdist = true |
| |
| [testenv] |
| passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH |
| deps = |
| -r{toxinidir}/requirements-tests.txt |
| pyopenssl |
| lockfile |
| libvirt-python==4.0.0 |
| py2.7: paramiko |
| py3.7: setuptools==41.0.1 |
| commands = cp libcloud/test/secrets.py-dist libcloud/test/secrets.py |
| python setup.py test |
| basepython = |
| {py2.7,checks,lint,pylint,coverage}: python2.7 |
| docs: python3.5 |
| pypypy: pypy |
| pypypy3: pypy3 |
| py3.4: python3.4 |
| py3.5: python3.5 |
| py3.6: python3.6 |
| py3.7: python3.7 |
| whitelist_externals = cp |
| bash |
| scripts/*.sh |
| |
| [testenv:docs] |
| deps = pysphere |
| pyopenssl |
| backports.ssl_match_hostname |
| lockfile |
| rstcheck |
| changedir = docs |
| commands = pip install sphinx~=1.6.0 |
| rstcheck --report warning ../CHANGES.rst |
| python ../contrib/generate_provider_feature_matrix_table.py |
| sphinx-apidoc -d 4 ../libcloud/ -o apidocs/ |
| /bin/bash -c "ls apidocs/modules.rst && (grep orphan apidocs/modules.rst || sed -i '1i :orphan:\n' apidocs/modules.rst) || (exit 0)" |
| sphinx-build -W -b html -d {envtmpdir}/doctrees . _build/html |
| |
| [testenv:docs-travis] |
| # Note: We don't build API docs on Travis since it causes build failures because |
| # those API docs files are not included anywhere. |
| deps = pysphere |
| pyopenssl |
| backports.ssl_match_hostname |
| lockfile |
| rstcheck |
| changedir = docs |
| commands = pip install sphinx~=1.6.0 |
| rstcheck --report warning ../README.rst |
| rstcheck --report warning ../CHANGES.rst |
| rstcheck --report warning ../CONTRIBUTING.rst |
| python ../contrib/generate_provider_feature_matrix_table.py |
| /bin/bash -c "ls apidocs/modules.rst && (grep orphan apidocs/modules.rst || sed -i '1i :orphan:\n' apidocs/modules.rst) || (exit 0)" |
| sphinx-build -W -b html -d {envtmpdir}/doctrees . _build/html |
| |
| [testenv:scrape-ec2-prices] |
| deps = requests |
| demjson |
| commands = python contrib/scrape-ec2-prices.py |
| |
| [testenv:pylint] |
| deps = -r{toxinidir}/requirements-tests.txt |
| backports.ssl_match_hostname |
| bottle |
| lockfile |
| paramiko |
| pysphere |
| setenv = |
| PYTHONPATH={toxinidir} |
| commands = pylint -E --load-plugins=pylint_plugins.driver_class --rcfile=./.pylintrc libcloud/common/ |
| pylint -E --load-plugins=pylint_plugins.driver_class --rcfile=./.pylintrc libcloud/compute/ |
| pylint -E --load-plugins=pylint_plugins.driver_class --rcfile=./.pylintrc libcloud/container/ |
| pylint -E --load-plugins=pylint_plugins.driver_class --rcfile=./.pylintrc libcloud/backup/ |
| pylint -E --load-plugins=pylint_plugins.driver_class --rcfile=./.pylintrc libcloud/dns/ |
| pylint -E --load-plugins=pylint_plugins.driver_class --rcfile=./.pylintrc libcloud/storage/ |
| pylint -E --load-plugins=pylint_plugins.driver_class --rcfile=./.pylintrc libcloud/utils/ |
| pylint -E --load-plugins=pylint_plugins.driver_class --rcfile=./.pylintrc demos/ |
| pylint -E --load-plugins=pylint_plugins.driver_class --rcfile=./.pylintrc contrib/ |
| pylint -E --load-plugins=pylint_plugins.driver_class --rcfile=./.pylintrc pylint_plugins/ |
| |
| [testenv:lint] |
| deps = -r{toxinidir}/requirements-tests.txt |
| backports.ssl_match_hostname |
| lockfile |
| rstcheck |
| |
| commands = flake8 libcloud/ |
| flake8 --max-line-length=160 libcloud/test/ |
| flake8 demos/ |
| flake8 integration/ |
| flake8 scripts/ |
| flake8 --ignore=E402,E902,W503,W504 docs/examples/ |
| flake8 --ignore=E402,E902,W503,W504 --max-line-length=160 contrib/ |
| python -mjson.tool libcloud/data/pricing.json /dev/null |
| rstcheck --report warning README.rst |
| rstcheck --report warning CHANGES.rst |
| rstcheck --report warning CONTRIBUTING.rst |
| |
| [testenv:checks] |
| commands = |
| bash ./scripts/check_file_names.sh |
| python ./scripts/check_asf_license_headers.py . |
| |
| [testenv:integration] |
| deps = -r{toxinidir}/integration/requirements.txt |
| |
| commands = python -m integration |
| |
| [testenv:coverage] |
| deps = |
| -r{toxinidir}/requirements-tests.txt |
| paramiko |
| pyopenssl |
| python-dateutil |
| libvirt-python==4.0.0 |
| lockfile |
| set-env = |
| commands = cp libcloud/test/secrets.py-dist libcloud/test/secrets.py |
| coverage run --source=libcloud setup.py test |
| |
| [testenv:coverage-travis] |
| passenv = TOXENV CI TRAVIS TRAVIS_* |
| deps = |
| -r{toxinidir}/requirements-tests.txt |
| paramiko |
| pyopenssl |
| libvirt-python==4.0.0 |
| lockfile |
| set-env = |
| commands = cp libcloud/test/secrets.py-dist libcloud/test/secrets.py |
| coverage run --source=libcloud setup.py test |
| codecov |