os-vif/tox.ini
Ghanshyam Mann 041ce67619 [goal] migrate testing to ubuntu focal
As per victoria cycle testing runtime and community goal[1]
we need to migrate upstream CI/CD to Ubuntu Focal(20.04).

Fixing:
- bug#1886298
Bump the lower constraints for required deps which added python3.8 support
in their later version.

Also adding bindep file for libffi packages.

Story: #2007865
Task: #40200

Change-Id: I8d9b8d9e19ca7b94f1ce1f2b95aeafc9f7127ea3
2020-08-06 16:58:28 +00:00

83 lines
2.2 KiB
INI

[tox]
minversion = 3.1.1
envlist = py37,pep8
skipsdist = True
ignore_basepython_conflict = True
[testenv]
basepython = python3
usedevelop = True
install_command = pip install -U {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
CONSTRAINTS_OPT=-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
deps =
{env:CONSTRAINTS_OPT}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
whitelist_externals = bash
commands = stestr run --black-regex ".tests.functional" {posargs}
[testenv:pep8]
commands = flake8
[testenv:venv]
commands = {posargs}
deps =
{env:CONSTRAINTS_OPT}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/doc/requirements.txt
[testenv:functional]
setenv =
{[testenv]setenv}
commands =
stestr run --black-regex ".tests.unit" '{posargs}'
[testenv:docs]
deps =
{env:CONSTRAINTS_OPT}
-r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:releasenotes]
deps =
{env:CONSTRAINTS_OPT}
-r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:lower-constraints]
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/doc/requirements.txt
commands =
stestr run --black-regex ".tests.functional" {posargs}
sphinx-build -W doc/source doc/build
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
# Following checks are ignored on purpose.
#
# H404, H405 skipped on purpose per jay pipes discussion.
# W504 line break after binary operator
show-source = True
ignore = E123,E125,E126,E127,E128,H404,H405,W504
enable-extensions = H106,H203
builtins = _
exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build
max-complexity = 30
[hacking]
import_exceptions = os_vif.i18n
[testenv:bindep]
# Do not install any requirements. We want this to be fast and work even if
# system dependencies are missing, since it's used to tell you what system
# dependencies are missing! This also means that bindep must be installed
# separately, outside of the requirements files.
deps = bindep
commands = bindep test