reegis/scenario_builder

View on GitHub
ci/templates/tox.ini

Summary

Maintainability
Test Coverage
[tox]
envlist =
    clean,
    check,
    docs,
{% for env in tox_environments|sort %}
    {{ env }},
{% endfor %}
    report

[testenv]
basepython =
    {bootstrap,clean,check,report,docs,codecov,coveralls}: {env:TOXPYTHON:python3}
setenv =
    PYTHONPATH={toxinidir}/tests
    PYTHONUNBUFFERED=yes
passenv =
    *
deps =
    pytest
    pytest-travis-fold
commands =
    {posargs:pytest -vv --ignore=src}

[testenv:bootstrap]
deps =
    jinja2
    matrix
skip_install = true
commands =
    python ci/bootstrap.py --no-env

[testenv:check]
deps =
    docutils
    check-manifest
    flake8
    readme-renderer
    pygments
    isort
skip_install = true
commands =
    python setup.py check --strict --metadata --restructuredtext
    check-manifest {toxinidir}
    flake8
    isort --verbose --check-only --diff --filter-files .


[testenv:docs]
usedevelop = true
deps =
    -r{toxinidir}/docs/requirements.txt
commands =
    sphinx-build {posargs:-E} -b html docs dist/docs
    sphinx-build -b linkcheck docs dist/docs

[testenv:coveralls]
deps =
    coveralls
skip_install = true
commands =
    coveralls []



[testenv:codecov]
deps =
    codecov
skip_install = true
commands =
    codecov []

[testenv:report]
deps = coverage
skip_install = true
commands =
    coverage report
    coverage html

[testenv:clean]
commands = coverage erase
skip_install = true
deps = coverage
{% for env, config in tox_environments|dictsort %}

[testenv:{{ env }}]
basepython = {env:TOXPYTHON:{{ env.split("-")[0] if env.startswith("pypy") else "python{0[2]}.{0[3]}".format(env) }}}
{% if config.cover or config.env_vars %}
setenv =
    {[testenv]setenv}
{% endif %}
{% for var in config.env_vars %}
    {{ var }}
{% endfor %}
{% if config.cover %}
usedevelop = true
commands =
    {posargs:pytest --cov --cov-report=term-missing -vv}
{% endif %}
{% if config.cover or config.deps %}
deps =
    {[testenv]deps}
{% endif %}
{% if config.cover %}
    pytest-cov
{% endif %}
{% for dep in config.deps %}
    {{ dep }}
{% endfor -%}
{% endfor -%}