1
0
mirror of https://github.com/enpaul/estraven.git synced 2024-10-22 15:27:00 +00:00
estraven/tox.ini

84 lines
1.8 KiB
INI
Raw Permalink Normal View History

2021-09-28 18:33:30 +00:00
[tox]
2022-01-09 03:43:26 +00:00
envlist = py3{7,8,9,10}, static, static-tests, security
2021-09-28 18:33:30 +00:00
isolated_build = true
skip_missing_interpreters = true
[testenv]
description = Run the tests
require_locked_deps = true
require_poetry = true
locked_deps =
pytest
pytest-cov
toml
commands =
2022-01-09 03:43:26 +00:00
pytest {toxinidir}/tests/ \
--cov {toxinidir}/estraven \
--cov-config {toxinidir}/.coveragerc \
--cov-report term-missing
2021-09-28 18:33:30 +00:00
[testenv:static]
description = Static formatting and quality enforcement
basepython = python3.8
platform = linux
ignore_errors = true
locked_deps =
black
blacken-docs
mdformat
mdformat-gfm
mypy
reorder-python-imports
pre-commit
pre-commit-hooks
pylint
commands =
pre-commit run --all-files
2022-01-09 03:43:26 +00:00
pylint {toxinidir}/estraven/ \
--rcfile {toxinidir}/.pylintrc
mypy {toxinidir}/estraven/ \
--ignore-missing-imports \
--no-strict-optional
2021-09-28 18:33:30 +00:00
[testenv:static-tests]
description = Static formatting and quality enforcement for the tests
basepython = python3.8
platform = linux
ignore_errors = true
locked_deps =
pylint
pytest
mypy
commands =
2022-01-09 03:43:26 +00:00
pylint {toxinidir}/tests/ \
--rcfile {toxinidir}/.pylintrc
mypy {toxinidir}/tests/ \
--ignore-missing-imports \
--no-strict-optional
2021-09-28 18:33:30 +00:00
[testenv:security]
description = Security checks
basepython = python3.8
platform = linux
ignore_errors = true
locked_deps =
bandit
safety
poetry
commands =
2022-01-09 03:43:26 +00:00
bandit {toxinidir}/genly/ \
--recursive \
--quiet
bandit {toxinidir}/tests/ \
--recursive \
--quiet \
--skip B101
poetry export \
--format requirements.txt \
--output {envtmpdir}/requirements.txt \
--without-hashes \
--dev
safety check \
--file {envtmpdir}/requirements.txt \
--json