election/tox.ini
Tony Breeds edfebf3dcc Update package metadata and tox4 setup
The current tox setup results in an 'editable-wheel' install which,
while it works, generates unhelpful warnings.  Switch to the 'editable'
type which is what you got under tox <= 4.

While we are reducing noise in the logs, correctly setup
openstack_elections.templates as a module.  We need it as a module as
we rely on Jinja2 to be able to use the module loader to locate the
templates.

Change-Id: Icbdca2f72c0777c587d6f95b3fab1911be179f97
2023-02-22 03:37:10 +00:00

39 lines
1.1 KiB
INI

[tox]
envlist = docs,linters,py3
minversion = 3.1.0
ignore_basepython_conflict=true
package = editable
skip_install = true
[testenv]
basepython = python3
setenv = VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
# NOTE: If py35 fails with "db type could not be determined", delete
# .testrepository and try again. Running py35 before py27 is OK, but not the
# other way around. See: https://bugs.launchpad.net/testrepository/+bug/1212909
commands = stestr run --slowest {posargs}
[testenv:linters]
commands = yamllint configuration.yaml
flake8
[testenv:venv]
commands = {posargs}
[testenv:docs]
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
commands = sphinx-build -v -W -b html -d doc/build/doctrees doc/source doc/build/html
[testenv:ci-checks-review]
commands = ci-check-all-candidate-files -v -v {posargs:--HEAD}
[testenv:ci-checks-election]
commands = ci-check-all-candidate-files
[flake8]
exclude=.tox,doc/source/conf.py