# Same dir as setup.py
# DOC https://github.com/tox-dev/tox/blob/master/tox.ini
# CONFIGS https://medium.com/analytics-vidhya/essential-developer-tools-for-improving-your-python-code-71616254134b
[tox]
envlist =
    py39 # python 3.9
isolated_build = true

[gh-actions]
python =
    3.7: py37
    3.8: py38
    3.9: py39

[testenv]
description= run the tests with pytest under {basepython}
require_locked_deps = true
install_dev_deps = true
setenv =
    PIP_DISABLE_PIP_VERSION_CHECK = 1
    COVERAGE_FILE = {env:COVERAGE_FILE:{toxworkdir}/.coverage.{envname}}
    #{py27,pypy}: PYTHONWARNINGS=ignore:DEPRECATION::pip._internal.cli.base_command
deps =
    # Dependencies to use
    black
    coverage
    flake8
    mccabe
    mypy
    pylint
    pytest
    safety

commands =
    python -V
    flake8 ./pipewire_python/
    # pylint ./pipewire_python/ # broken 2021-09-07
    # mypy ./pipewire_python/ # broken 2021-06-20
    black ./pipewire_python/
    safety check
    # TESTS MOVED TO codecov.yml