blob: 248b10229a4491b1cf8d3f5a101bc022385333ca [file] [log] [blame]
[tox]
envlist = py{2.5,2.6,2.7,pypy,pypy3,3.2,3.3,3.4,3.5},lint,pylint
[testenv]
passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH
deps =
-r{toxinidir}/requirements-tests.txt
lockfile
py{2.5,2.6,2.7}: paramiko
py{2.5,2.6}: unittest2
set-env =
COVERALLS_REPO_TOKEN = GAB5ZuovdsVEFxSIyZE8YhDYU886iGW54
commands = cp libcloud/test/secrets.py-dist libcloud/test/secrets.py
python setup.py test
# coverage run --source=libcloud setup.py test
# coveralls
basepython =
py2.5: python2.5
py2.6: python2.6
{py2.7,lint,pylint,docs}: python2.7
pypypy: pypy
pypypy3: pypy3
py3.2: python3.2
py3.3: python3.3
py3.4: python3.4
py3.5: python3.5
whitelist_externals = cp
# Explicitly spell out all environments to test with builtin xml and lxml,
# as it seems I can't use the following:
# [testenv:py{2.5,2.6,2.7,pypy,pypy3,3.2,3.3,3.4,3.5}-lxml]
[testenv:py2.5-lxml]
deps = -r{toxinidir}/requirements-tests.txt
unittest2
paramiko
lxml
[testenv:py2.6-lxml]
deps = -r{toxinidir}/requirements-tests.txt
unittest2
paramiko
lxml
[testenv:py2.7-lxml]
deps = -r{toxinidir}/requirements-tests.txt
lxml
[testenv:pypypy-lxml]
deps = -r{toxinidir}/requirements-tests.txt
lxml
[testenv:pypypy3-lxml]
deps = -r{toxinidir}/requirements-tests.txt
lxml
[testenv:py3.2-lxml]
deps = -r{toxinidir}/requirements-tests.txt
lxml
[testenv:py3.3-lxml]
deps = -r{toxinidir}/requirements-tests.txt
lxml
[testenv:py3.4-lxml]
deps = -r{toxinidir}/requirements-tests.txt
lxml
[testenv:py3.5-lxml]
deps = -r{toxinidir}/requirements-tests.txt
lxml
[testenv:docs]
deps = sphinx
pysphere
backports.ssl_match_hostname
changedir = docs
commands = python ../contrib/generate_provider_feature_matrix_table.py
sphinx-apidoc -d 4 ../libcloud/ -o apidocs/
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 = sphinx
pysphere
backports.ssl_match_hostname
changedir = docs
commands = python ../contrib/generate_provider_feature_matrix_table.py
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
commands = pylint -E --rcfile=./.pylintrc libcloud/common/
pylint -E --rcfile=./.pylintrc libcloud/container/
pylint -E --rcfile=./.pylintrc libcloud/backup/
pylint -E --rcfile=./.pylintrc libcloud/dns/
pylint -E --rcfile=./.pylintrc libcloud/storage/
pylint -E --rcfile=./.pylintrc libcloud/utils/
pylint -E --rcfile=./.pylintrc demos/
pylint -E --rcfile=./.pylintrc contrib/
[testenv:lint]
deps = -r{toxinidir}/requirements-tests.txt
backports.ssl_match_hostname
commands = flake8 --ignore=E402 --exclude="test" libcloud/
flake8 --ignore=E402 --max-line-length=160 libcloud/test/
flake8 --ignore=E402 demos/
flake8 --ignore=E402,E902 docs/examples/
flake8 --ignore=E402,E902 --max-line-length=160 contrib/
python -mjson.tool libcloud/data/pricing.json