Add a requirements.txt check job
This patch adds a new tox environment and gate job that checks requirements.txt for missing or extra requirements. Change-Id: Id8c44821455644576cf055cccaa38c9ab2f49ec6
This commit is contained in:
parent
e45ecc2111
commit
6a3a81b661
22
tox.ini
22
tox.ini
@ -1,6 +1,6 @@
|
||||
[tox]
|
||||
minversion = 2.5.0
|
||||
envlist = docs,py3,functional-py3,pep8,specs
|
||||
envlist = docs,py3,functional-py3,pep8,specs,pip-missing-reqs,pip-extra-reqs
|
||||
skipsdist = True
|
||||
ignore_basepython_conflict = True
|
||||
|
||||
@ -223,3 +223,23 @@ deps =
|
||||
whitelist_externals = sh
|
||||
commands =
|
||||
sh -c '{envdir}/src/openstack-requirements/playbooks/files/project-requirements-change.py --req {envdir}/src/openstack-requirements --local {toxinidir} master'
|
||||
|
||||
[testenv:pip-missing-reqs]
|
||||
# do not install test-requirements as that will pollute the virtualenv for
|
||||
# determining missing packages
|
||||
# this also means that pip-check-reqs must be installed separately, outside
|
||||
# of the requirements.txt files
|
||||
deps = pip-check-reqs
|
||||
-r{toxinidir}/requirements.txt
|
||||
commands =
|
||||
pip-missing-reqs --ignore-file=octavia/tests/* octavia
|
||||
|
||||
[testenv:pip-extra-reqs]
|
||||
# do not install test-requirements as that will pollute the virtualenv for
|
||||
# determining missing packages
|
||||
# this also means that pip-check-reqs must be installed separately, outside
|
||||
# of the requirements.txt files
|
||||
deps = pip-check-reqs
|
||||
-r{toxinidir}/requirements.txt
|
||||
commands =
|
||||
pip-extra-reqs octavia
|
||||
|
@ -177,3 +177,17 @@
|
||||
vars:
|
||||
devstack_localrc:
|
||||
OCTAVIA_AMP_USE_NFTABLES: True
|
||||
|
||||
- job:
|
||||
name: openstack-tox-pip-check-reqs
|
||||
parent: openstack-tox
|
||||
description: |
|
||||
Run pip-missing-reqs and pip-extra-reqs tests to check for missing or
|
||||
extra requirements.txt entries.
|
||||
|
||||
Uses tox with the ``pip-missing-reqs`` and ``pip-extra-reqs``
|
||||
environments.
|
||||
required-projects:
|
||||
- openstack/octavia
|
||||
vars:
|
||||
tox_envlist: pip-missing-reqs,pip-extra-reqs
|
||||
|
@ -12,6 +12,14 @@
|
||||
- octavia-tox-tips
|
||||
check:
|
||||
jobs:
|
||||
- openstack-tox-pip-check-reqs:
|
||||
irrelevant-files:
|
||||
- ^.*\.rst$
|
||||
- ^api-ref/.*$
|
||||
- ^doc/.*$
|
||||
- ^etc/.*$
|
||||
- ^octavia/tests/.*$
|
||||
- ^releasenotes/.*$
|
||||
- openstack-tox-functional-py36:
|
||||
irrelevant-files:
|
||||
- ^.*\.rst$
|
||||
@ -68,6 +76,14 @@
|
||||
fail-fast: true
|
||||
queue: octavia
|
||||
jobs:
|
||||
- openstack-tox-pip-check-reqs:
|
||||
irrelevant-files:
|
||||
- ^.*\.rst$
|
||||
- ^api-ref/.*$
|
||||
- ^doc/.*$
|
||||
- ^etc/.*$
|
||||
- ^octavia/tests/.*$
|
||||
- ^releasenotes/.*$
|
||||
- openstack-tox-functional-py36:
|
||||
irrelevant-files:
|
||||
- ^.*\.rst$
|
||||
|
Loading…
x
Reference in New Issue
Block a user