drydock/tox.ini
Scott Hussey 20873ad4f9 Update docs for developer overview
- New diagrams and documents for developer overview
- Update conf.py for docs to work w/ readthedocs.io
- Add policy and config gen to `make docs`
- Update zuul-linter to support checked in images
- Last fix to document publishing

Change-Id: I4faa1b87032ae5b0e786aa0fd998f809124b7987
2018-06-01 14:50:05 -05:00

88 lines
2.4 KiB
INI

[tox]
envlist = pep8,bandit,unit
[testenv]
setenv = YAMLDIR = {toxinidir}/tests/yaml_samples/
basepython=python3.5
deps=
-rrequirements-lock.txt
-rrequirements-test.txt
[testenv:freeze]
whitelist_externals=rm
deps=
-rrequirements-direct.txt
commands=
rm requirements-lock.txt
sh -c "pip freeze --all | grep -v 'drydock-provisioner|pyinotify|pkg-resources==0.0.0' > requirements-lock.txt"
[testenv:yapf]
whitelist_externals=find
commands=
yapf -i -r --style=pep8 {toxinidir}/setup.py
yapf -i -r --style=pep8 {toxinidir}/alembic
yapf -i -r --style=pep8 {toxinidir}/drydock_provisioner
yapf -i -r --style=pep8 {toxinidir}/tests
find {toxinidir}/drydock_provisioner -name '__init__.py' -exec yapf -i --style=pep8 \{\} ;
[testenv:unit]
usedevelop=True
setenv=
PYTHONWARNING=all
YAMLDIR={toxinidir}/tests/yaml_samples/
commands=
py.test \
--cov=drydock_provisioner \
{toxinidir}/tests/unit/{posargs}
[testenv:integration]
passenv=DOCKER_REGISTRY IMAGE_NAME IMAGE_PREFIX IMAGE_TAG
setenv=
PYTHONWARNING=all
YAMLDIR={toxinidir}/tests/yaml_samples/
commands=
{toxinidir}/tests/postgres/start_postgres.sh
py.test \
{toxinidir}/tests/integration/postgres/{posargs}
[testenv:coverage]
usedevelop=True
passenv=DOCKER_REGISTRY IMAGE_NAME IMAGE_PREFIX IMAGE_TAG
setenv=
YAMLDIR={toxinidir}/tests/yaml_samples/
commands=
{toxinidir}/tests/postgres/start_postgres.sh
py.test --cov=drydock_provisioner \
{toxinidir}/tests/unit/ {toxinidir}/tests/integration/postgres
[testenv:genconfig]
whitelist_externals=tee
sh
commands = sh -c 'oslo-config-generator --config-file=etc/drydock/drydock-config-generator.conf | tee etc/drydock/drydock.conf.sample docs/source/_static/drydock.conf.sample'
[testenv:genpolicy]
whitelist_externals=tee
sh
commands = sh -c 'oslopolicy-sample-generator --config-file etc/drydock/drydock-policy-generator.conf | tee etc/drydock/policy.yaml.sample docs/source/_static/policy.yaml.sample'
[testenv:pep8]
commands = flake8 \
{posargs}
[testenv:bandit]
commands = bandit -r drydock_provisioner -n 5
[flake8]
ignore=E302,H306,H304,W503,E251,E126
exclude= venv,.venv,.git,.idea,.tox,*.egg-info,*.eggs,bin,dist,./build/,alembic/
max-line-length=119
[testenv:docs]
deps=
-rdocs/requirements-doc.txt
whitelist_externals=rm
recreate=true
commands =
rm -rf docs/build
sphinx-build -b html docs/source docs/build