ui-cookiecutter/tox.ini
Shu Muto 31151ab91e Run tox on created plugin
This patch enables to run `tox` for testing generated plugin.
Also, adds tox targets for eslint, karma, docs and releasenotes
on generated plugin. In generated tox, "-local" targets are executed
for local tox test. In Ci infra, target jobs, i.e. without "-local"
targets, will be ran as setting,

To add these new targets, this patch refreshes requirements
and fixes tests.

Horizon plugins should be tested with Horizon on master branch,
so parent tox, i.e. "checkbuild" target on ui-cookiecutter/tox.ini,
will clone horizon from git into .tox/checkbuild/horizon/.

lower-constraints job will be added in subsequent patch.

Change-Id: I4a1fd2d90b086f6ebec80d44cc36ef8beb3dbf0b
2018-05-16 17:52:59 +09:00

33 lines
876 B
INI

[tox]
minversion = 2.0
envlist = checkbuild
skipsdist = True
[testenv]
basepython = python2.7
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -U {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
[testenv:venv]
commands = {posargs}
[testenv:checkbuild]
setenv =
IGNORE_GIT=1
commands =
rm -rf {envdir}/horizon
git clone https://git.openstack.org/openstack/horizon {envdir}/horizon
rm -rf {envdir}/cafe-ui
cookiecutter --no-input --output-dir {envdir} {toxinidir}
# To pass {postargs} for running `tox -edocs` in generated plugin,
# run `tox -- -edocs` in ui-cookiecutter.
tox --workdir {envdir}/cafe-ui/.tox -c {envdir}/cafe-ui/tox.ini {posargs}
whitelist_externals =
git
rm
tox