# config file for tox [tox] envlist = py3{7,8,9,10,11,12},ruff,mypy,cformat,docs [testenv:ruff] basepython = python3.12 deps = ruff>=0.3.7 commands = ruff check setup.py pg pgdb tests [testenv:mypy] basepython = python3.12 deps = mypy>=1.9.0 commands = mypy pg pgdb tests [testenv:cformat] basepython = python3.12 allowlist_externals = sh commands = sh -c "! (clang-format --style=file -n ext/*.c 2>&1 | tee /dev/tty | grep format-violations)" [testenv:docs] basepython = python3.12 deps = sphinx>=7,<8 commands = sphinx-build -b html -nEW docs docs/_build/html [testenv:build] basepython = python3.12 deps = setuptools>=68 wheel>=0.42,<1 build>=1,<2 commands = python -m build -s -n -C strict -C memory-size [testenv:coverage] basepython = python3.12 deps = coverage>=7,<8 commands = coverage run -m unittest discover coverage html [testenv] passenv = PG* PYGRESQL_* deps = setuptools>=68 commands = python setup.py clean --all build_ext --force --inplace --strict --memory-size python -m unittest {posargs:discover}