mirror of
https://opendev.org/openstack/ansible-collections-openstack.git
synced 2026-05-07 22:03:09 +00:00
Refactored tox requirements for different Ansible releases
Sorted pip requirements file to improve readability. Moved pip requirements for tests into tests subdirectory and dropped 'pip-' prefix to shorten filenames and conform with common naming scheme for pip requirements files. Added constrains on OpenStack SDK 1.*.* to job ansible-collections-\ openstack-functional-devstack-releases on master branch because only stable/1.0.0 branch is compatible to the OpenStack SDK 0.*.* series. Changed job ansible-collections-openstack-functional-devstack-releases on master branch to non-voting because OpenStack SDK 1.*.* has not been released to PyPI yet, so tests on master branch are expected to fail once we introduce breaking changes from stable/1.0.0 branch. Change-Id: I6b6bb8c6900f7c8341bbf3f9a24999fbf693ba4b
This commit is contained in:
49
tox.ini
49
tox.ini
@@ -1,6 +1,6 @@
|
||||
[tox]
|
||||
minversion = 3.18.0
|
||||
envlist = pep8
|
||||
envlist = linters
|
||||
skipsdist = True
|
||||
ignore_basepython_conflict = True
|
||||
|
||||
@@ -21,8 +21,8 @@ setenv =
|
||||
OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
|
||||
pip: PIP_INSTALL={env:PIP_INSTALL:true}
|
||||
deps =
|
||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/pip-constraints-none.txt}
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/constraints-none.txt}
|
||||
-r{toxinidir}/tests/requirements.txt
|
||||
pip: {toxinidir}
|
||||
|
||||
commands = stestr run {posargs}
|
||||
@@ -34,10 +34,10 @@ commands =
|
||||
|
||||
[testenv:build]
|
||||
deps =
|
||||
ansible-core
|
||||
galaxy-importer
|
||||
pbr
|
||||
ruamel.yaml
|
||||
galaxy-importer
|
||||
ansible-core
|
||||
|
||||
commands =
|
||||
python {toxinidir}/tools/build.py
|
||||
@@ -59,28 +59,22 @@ commands =
|
||||
passenv = {[testenv:linters]passenv}
|
||||
commands = {[testenv:linters]commands}
|
||||
deps =
|
||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/pip-constraints-none.txt}
|
||||
-r{toxinidir}/test-requirements-2.9.txt
|
||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/constraints-none.txt}
|
||||
-r{toxinidir}/tests/requirements-ansible-2.9.txt
|
||||
|
||||
[testenv:linters-2.11]
|
||||
passenv = {[testenv:linters]passenv}
|
||||
commands = {[testenv:linters]commands}
|
||||
deps =
|
||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/pip-constraints-none.txt}
|
||||
-r{toxinidir}/test-requirements-2.11.txt
|
||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/constraints-none.txt}
|
||||
-r{toxinidir}/tests/requirements-ansible-2.11.txt
|
||||
|
||||
[testenv:linters-2.12]
|
||||
passenv = {[testenv:linters]passenv}
|
||||
commands = {[testenv:linters]commands}
|
||||
deps =
|
||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/pip-constraints-none.txt}
|
||||
-r{toxinidir}/test-requirements-2.12.txt
|
||||
|
||||
[testenv:venv]
|
||||
deps =
|
||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/pip-constraints-none.txt}
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
commands = {posargs}
|
||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/constraints-none.txt}
|
||||
-r{toxinidir}/tests/requirements-ansible-2.12.txt
|
||||
|
||||
[flake8]
|
||||
# W503 Is supposed to be off by default but in the latest pycodestyle isn't.
|
||||
@@ -104,33 +98,24 @@ deps =
|
||||
commands =
|
||||
/bin/bash {toxinidir}/ci/run-ansible-tests-collection.sh -e {envdir} {posargs}
|
||||
|
||||
# PIP job runs with Ansible-2.9
|
||||
[testenv:ansible-pip]
|
||||
deps =
|
||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/pip-constraints-none.txt}
|
||||
-r{toxinidir}/test-requirements-2.9.txt
|
||||
{toxinidir}
|
||||
passenv = {[testenv:ansible]passenv}
|
||||
commands = {[testenv:ansible]commands}
|
||||
|
||||
[testenv:ansible-2.9]
|
||||
deps =
|
||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/pip-constraints-none.txt}
|
||||
-r{toxinidir}/test-requirements-2.9.txt
|
||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/constraints-none.txt}
|
||||
-r{toxinidir}/tests/requirements-ansible-2.9.txt
|
||||
passenv = {[testenv:ansible]passenv}
|
||||
commands = {[testenv:ansible]commands}
|
||||
|
||||
[testenv:ansible-2.11]
|
||||
deps =
|
||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/pip-constraints-none.txt}
|
||||
-r{toxinidir}/test-requirements-2.11.txt
|
||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/constraints-none.txt}
|
||||
-r{toxinidir}/tests/requirements-ansible-2.11.txt
|
||||
passenv = {[testenv:ansible]passenv}
|
||||
commands = {[testenv:ansible]commands}
|
||||
|
||||
[testenv:ansible-2.12]
|
||||
deps =
|
||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/pip-constraints-none.txt}
|
||||
-r{toxinidir}/test-requirements-2.12.txt
|
||||
-c{env:TOX_CONSTRAINTS_FILE:{toxinidir}/tests/constraints-none.txt}
|
||||
-r{toxinidir}/tests/requirements-ansible-2.12.txt
|
||||
passenv = {[testenv:ansible]passenv}
|
||||
commands = {[testenv:ansible]commands}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user