kiwi-el8/tox.ini
2020-07-03 10:27:57 +02:00

179 lines
4.1 KiB
INI

# Tox configuration file
#
# For more information, see https://tox.readthedocs.org
#
# Run it with
# a) all targets
# $ tox
#
# b) with specific targets (build only documentation):
# $ tox -e doc
#
[tox]
minversion = 2.9.1
skip_missing_interpreters = True
skipsdist = True
envlist =
check,
unit_py3_7,
unit_py3_6,
packagedoc,
devel
[testenv]
description =
{unit_py3_6,unit_py3_7}: Unit Test run with basepython set to {basepython}
devel: Test KIWI
whitelist_externals = *
basepython =
{check,devel,packagedoc,doc,doc_travis,doc_suse}: python3
unit_py3_7: python3.7
unit_py3_6: python3.6
envdir =
{check,devel,packagedoc,doc,doc_travis,doc_suse}: {toxworkdir}/3
unit_py3_7: {toxworkdir}/3.7
unit_py3_6: {toxworkdir}/3.6
passenv =
*
usedevelop = True
deps =
-r.virtualenv.dev-requirements.txt
# Unit Test run with basepython set to 3.6
[testenv:unit_py3_6]
skip_install = True
usedevelop = True
setenv =
PYTHONPATH={toxinidir}/test
PYTHONUNBUFFERED=yes
WITH_COVERAGE=yes
passenv =
*
deps = {[testenv]deps}
changedir=test/unit
commands =
bash -c 'cd ../../ && ./setup.py develop'
pytest --no-cov-on-fail --cov=kiwi \
--cov-report=term-missing \
--cov-fail-under=100 --cov-config .coveragerc {posargs}
# Unit Test run with basepython set to 3.7
[testenv:unit_py3_7]
skip_install = True
usedevelop = True
setenv =
PYTHONPATH={toxinidir}/test
PYTHONUNBUFFERED=yes
WITH_COVERAGE=yes
passenv =
*
deps = {[testenv]deps}
changedir=test/unit
commands =
bash -c 'cd ../../ && ./setup.py develop'
pytest --doctest-modules --no-cov-on-fail --cov=kiwi \
--cov-report=term-missing --cov-fail-under=100 \
--cov-config .coveragerc {posargs}
[testenv:doc]
description = Documentation build suitable for local review
skip_install = True
usedevelop = True
deps = {[testenv]deps}
changedir=doc
commands =
{[testenv:doc.html]commands}
{[testenv:doc.man]commands}
[testenv:packagedoc]
description = Documentation build run suitable for doc deployment in package(rpm)
skip_install = True
usedevelop = True
deps = {[testenv]deps}
changedir=doc
commands =
{[testenv:doc.latexpdf]commands}
{[testenv:doc.man]commands}
[testenv:doc_travis]
description = Documentation build suitable for doc deployment in travis env
skip_install = True
usedevelop = True
deps = {[testenv:doc]deps}
changedir=doc
commands =
{[testenv:doc.man]commands}
travis-sphinx --outdir build_travis build --nowarn --source ./source
bash -c 'touch ./build_travis/.nojekyll'
[testenv:doc_suse]
description = Documentation build suitable for SUSE documentation
skip_install = True
usedevelop = True
deps = {[testenv:doc]deps}
changedir=doc
commands =
{[testenv:doc.xml]commands}
rstxml2docbook -v --no-split -o build/xml/book.xml build/restxml/index.xml
bash -c 'mkdir -p build/images/src/png && cp -a source/.images/* build/images/src/png'
cp DC-kiwi build/
bash -c 'cd build && daps -d DC-kiwi html'
[testenv:doc.html]
description = Documentation build html result
skip_install = True
deps = {[testenv:doc]deps}
changedir=doc
commands =
make html
[testenv:doc.xml]
description = Documentation build xml result
skip_install = True
deps = {[testenv:doc]deps}
changedir=doc
commands =
make xml
rm -rf build/restxml
mv build/xml build/restxml
[testenv:doc.latexpdf]
description = Documentation build PDF result
skip_install = True
deps = {[testenv:doc]deps}
changedir=doc
commands =
make latexpdf
[testenv:doc.man]
description = Documentation build man pages
skip_install = True
deps = {[testenv:doc]deps}
changedir=doc
commands =
make man
[testenv:check]
description = Source code quality/integrity check
deps = {[testenv]deps}
skip_install = True
usedevelop = True
commands =
flake8 --statistics -j auto --count {toxinidir}/kiwi
flake8 --statistics -j auto --count {toxinidir}/test/unit
bash -c 'shellcheck -e SC1091,SC1090,SC2001,SC2174,SC1117 {toxinidir}/dracut/modules.d/*/* -s bash'
bash -c 'shellcheck -e SC1091,SC1090,SC2001,SC2174,SC1117 {toxinidir}/kiwi/config/functions.sh -s bash'