66 lines
1.5 KiB
INI

# This is the configuration for the tox-gh-actions plugin for GitHub Actions
# https://github.com/ymyzk/tox-gh-actions
# This section is not needed if not using GitHub Actions for CI.
[gh-actions]
python =
3.11: py311
[tox]
# These are the default environments that will be run
# when ``tox`` is run without arguments.
envlist =
lint
py{311}
skip_missing_interpreters = true
requires = tox-uv
# Activate isolated build environment. tox will use a virtual environment
# to build a source distribution from the source tree. For build tools and
# arguments use the pyproject.toml file as specified in PEP-517 and PEP-518.
isolated_build = true
[testenv]
package = editable
deps =
pytest
commands =
# Use -bb to enable BytesWarnings as error to catch str/bytes misuse.
# Use -Werror to treat warnings as errors.
uv run pytest tests {posargs}
[testenv:type-check]
skip_install = true
deps =
pytest
mypy
commands =
uv run mypy src tests
[testenv:lint]
skip_install = true
deps =
pytest
ruff
commands =
uv run ruff check aprsd_slack_plugin tests
[testenv:docs]
skip_install = true
deps =
pytest
sphinx
changedir = {toxinidir}/docs
commands =
uv run python clean_docs.py
uv run sphinx-apidoc --force --output-dir apidoc {toxinidir}/aprsd_slack_plugin
uv run sphinx-build -a -W . _build
[testenv:licenses]
skip_install = true
recreate = true
deps =
pytest
pip-licenses
commands =
uv run pip-licenses {posargs}