From 0ae1c7fd199f266a0ec57fd453fb5887b10f85b4 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Wed, 11 Jul 2018 07:32:58 -0400 Subject: [PATCH] add tox env for running requirements-check Set up a tox environment for running project-requirements-change.py, the script used in the requirements-check job. Change-Id: I5336222949acfd947f2ef54ed120e3632b28ccb7 Signed-off-by: Doug Hellmann --- README.rst | 10 ++++++++++ tox.ini | 6 ++++++ 2 files changed, 16 insertions(+) diff --git a/README.rst b/README.rst index 2295ca4e05..7f6c33d417 100644 --- a/README.rst +++ b/README.rst @@ -71,6 +71,16 @@ requirements is produced. If the inputs are lower-constraints.txt, the output includes the highest version of each package referenced in the files. +check-requirements +------------------ + +Run the validation checks from the ``requirements-check`` job locally +using the ``requirements-check`` tox environment. + +Run:: + + $ tox -e requirements-check -- /path/to/repo/to/test + Proposing changes ================= diff --git a/tox.ini b/tox.ini index df847ef7b5..e11329b25a 100644 --- a/tox.ini +++ b/tox.ini @@ -95,6 +95,12 @@ basepython = python3.5 [testenv:py36] basepython = python3.6 +[testenv:requirements-check] +basepython = python3 +deps = -r{toxinidir}/requirements.txt +commands = + {toxinidir}/playbooks/files/project-requirements-change.py --local {posargs} + [testenv:babel] # Use the local upper-constraints.txt file deps = Babel