
Run galaxy-importer on the built artifact and fail if galaxy is going to fail. Remove license_file entry in galaxy.yml Change-Id: I6c2ac22ccb56f52f8efcefc5891b10875ae8c0b5
74 lines
2.1 KiB
INI
74 lines
2.1 KiB
INI
[tox]
|
|
minversion = 3.1
|
|
envlist = pep8
|
|
skipsdist = True
|
|
ignore_basepython_conflict = True
|
|
|
|
[testenv]
|
|
skip_install = True
|
|
install_command = python -m pip install {opts} {packages}
|
|
basepython = python3
|
|
passenv = OS_*
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
LANG=en_US.UTF-8
|
|
LANGUAGE=en_US:en
|
|
LC_ALL=C
|
|
OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
|
|
OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
|
|
OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
|
|
deps =
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
commands = stestr run {posargs}
|
|
stestr slowest
|
|
|
|
[testenv:pep8]
|
|
commands =
|
|
flake8
|
|
|
|
# NOTE(mordred): Until ansible 2.10 is released we need to override deps for this env
|
|
# here because we need to use 2.10 galaxy to build the collection and properly
|
|
# respect build_ignore
|
|
[testenv:build]
|
|
deps =
|
|
pbr
|
|
ruamel.yaml
|
|
galaxy-importer
|
|
git+https://github.com/ansible/ansible
|
|
commands =
|
|
python {toxinidir}/tools/build.py
|
|
ansible-galaxy collection build --force {toxinidir} --output-path {toxinidir}/build_artifact
|
|
/bin/bash {toxinidir}/tools/check-import.sh {toxinidir}
|
|
|
|
[testenv:linters]
|
|
passenv = *
|
|
commands =
|
|
{[testenv:build]commands}
|
|
{[testenv:pep8]commands}
|
|
/bin/bash {toxinidir}/tools/run-ansible-sanity.sh {toxinidir}
|
|
|
|
[testenv:venv]
|
|
deps =
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands = {posargs}
|
|
|
|
[flake8]
|
|
# W503 Is supposed to be off by default but in the latest pycodestyle isn't.
|
|
# Also, both openstacksdk and Donald Knuth disagree with the rule. Line
|
|
# breaks should occur before the binary operator for readability.
|
|
# H4 are rules for docstrings. Maybe we should clean them?
|
|
# E501,E402,H301 are ignored so we can import the existing
|
|
# modules unchanged and then clean them in subsequent patches.
|
|
ignore = W503,H4,E501,E402,H301
|
|
show-source = True
|
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,ansible_collections
|
|
|
|
[testenv:ansible]
|
|
# Need to pass some env vars for the Ansible playbooks
|
|
passenv = HOME USER ANSIBLE_VAR_*
|
|
deps =
|
|
{[testenv]deps}
|
|
commands =
|
|
/bin/bash {toxinidir}/ci/run-ansible-tests-collection.sh -e {envdir} {posargs}
|