melexis/warnings-plugin

View on GitHub
tox.ini

Summary

Maintainability
Test Coverage
[tox]
envlist =
    clean,
    check,
    py38, py39, py310, py311, py312

[gh-actions]
python =
    3.8: py38
    3.9: py39
    3.10: py310
    3.11: py311
    3.12: py312

[testenv]
basepython =
    py: python3
    pypy: {env:TOXPYTHON:pypy}
    py38: {env:TOXPYTHON:python3.8}
    py39: {env:TOXPYTHON:python3.9}
    py310: {env:TOXPYTHON:python3.10}
    py311: {env:TOXPYTHON:python3.11}
    py312: {env:TOXPYTHON:python3.12}
    {lxml_support,bootstrap,spell,docs,check,coverage,report,clean}: python3
setenv =
    PYTHONPATH={toxinidir}/tests
    PYTHONUNBUFFERED=yes
passenv =
    *
deps =
    pytest
    pytest-cov
    setuptools_scm
    coverage
commands =
    pytest --cov=mlx --cov-report=term-missing -vv tests/
    mlx-warnings -h
    mlx-warnings --version
    python -c 'import mlx.warnings;print(mlx.warnings.__version__)'
    python -m mlx.warnings -h
    python -m mlx.warnings --version
    python -m mlx.warnings -j --maxwarnings 3 --minwarnings 3 tests/test_in/junit*.xml
    python -m mlx.warnings -j --maxwarnings 3 --minwarnings 3 "tests/test_in/junit*.xml"  #emulate for windows (no shell expansion)
    python -m mlx.warnings -j --command --maxwarnings 2 --minwarnings 2 cat tests/test_in/junit_double_fail.xml

[testenv:lxml_support]
deps =
    pytest
    lxml
commands =
    pytest -vv tests/

[testenv:bootstrap]
deps =
    jinja2
    matrix
skip_install = true
commands =
    python ci/bootstrap.py
passenv =
    *

[testenv:spell]
setenv =
    SPELLCHECK=1
commands =
    sphinx-build -b spelling docs docs/_build
skip_install = true
deps =
    -r{toxinidir}/docs/requirements.txt
    sphinxcontrib-spelling
    pyenchant

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

[testenv:check]
deps =
    docutils
    build
    twine >= 1.12.0
    readme-renderer
    flake8
    pygments
    check-manifest
skip_install = true
commands =
    python -m build
    twine check dist/*
    check-manifest {toxinidir}
    flake8 src tests setup.py

[testenv:coverage]
deps =
    coverage
skip_install = true
commands =
    coverage xml --ignore-errors

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

[testenv:clean]
commands = coverage erase
skip_install = true
deps = coverage