Skip to content

Commit

Permalink
add upper_constraints support
Browse files Browse the repository at this point in the history
- This change enforces the use of upper_constraints
  in tox envs.

Change-Id: I2badb5a3cd5f1ab2a66d3ebd97432b77985ada1b
  • Loading branch information
SeanMooney authored and stephenfin committed Jul 19, 2018
1 parent 9679783 commit 96b5a11
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions tox.ini
Expand Up @@ -7,9 +7,12 @@ skipsdist = True
usedevelop = True
install_command = pip install -U {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
VIRTUAL_ENV={envdir}
CONSTRAINTS_OPT=-c {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
deps =
{env:CONSTRAINTS_OPT}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
whitelist_externals = bash
commands = stestr run --black-regex ".tests.functional" {posargs}

Expand All @@ -21,6 +24,7 @@ commands = flake8
basepython = python3
commands = {posargs}
deps =
{env:CONSTRAINTS_OPT}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/doc/requirements.txt
Expand All @@ -34,12 +38,16 @@ commands =

[testenv:docs]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
deps =
{env:CONSTRAINTS_OPT}
-r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W doc/source doc/build

[testenv:releasenotes]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
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]
Expand Down

0 comments on commit 96b5a11

Please sign in to comment.