mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-06-28 06:41:43 +00:00
migrate to tox
this also requires to move default configuration files to share/ahriman. Thus the following features have been added * default configuration is not stored in /usr/share/ahriman/settings * package installed via PKGBUILD now copies files from /usr * configuration class now fallbacks to default in /usr
This commit is contained in:
35
tox.ini
Normal file
35
tox.ini
Normal file
@ -0,0 +1,35 @@
|
||||
[tox]
|
||||
envlist = check, tests
|
||||
dependencies = -e .[s3,web]
|
||||
project_name = ahriman
|
||||
|
||||
[pytest]
|
||||
addopts = --cov=ahriman --cov-report=term-missing:skip-covered --spec
|
||||
asyncio_mode = legacy
|
||||
spec_test_format = {result} {docstring_summary}
|
||||
|
||||
[testenv]
|
||||
deps =
|
||||
-e .[s3,web]
|
||||
|
||||
[testenv:check]
|
||||
deps =
|
||||
{[tox]dependencies}
|
||||
-e .[check]
|
||||
allowlist_externals =
|
||||
/bin/bash
|
||||
setenv =
|
||||
MYPYPATH=src
|
||||
commands =
|
||||
autopep8 --exit-code --max-line-length 120 -aa -i -j 0 -r "src/{[tox]project_name}" "tests/{[tox]project_name}"
|
||||
pylint --rcfile=.pylintrc "src/{[tox]project_name}"
|
||||
bandit -c .bandit.yml -r "src/{[tox]project_name}"
|
||||
bandit -c .bandit-test.yml -r "tests/{[tox]project_name}"
|
||||
/bin/bash -c 'mypy --implicit-reexport --strict -p "{[tox]project_name}" --install-types --non-interactive || mypy --implicit-reexport --strict -p "{[tox]project_name}"'
|
||||
|
||||
[testenv:tests]
|
||||
deps =
|
||||
{[tox]dependencies}
|
||||
-e .[tests]
|
||||
commands =
|
||||
pytest
|
Reference in New Issue
Block a user