-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
47 lines (36 loc) · 1.35 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# tox (https://tox.readthedocs.io/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[tox]
envlist = py38, py39, py310, py311, py312, flake8, pylint
skip_missing_interpreters = true
[testenv]
passenv = AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_SESSION_TOKEN
AWS_REGION
AWS_DEFAULT_REGION
AWS_CONTAINER_CREDENTIALS_RELATIVE_URI
SETUPTOOLS_SCM_PRETEND_VERSION
setenv = PYTHONPATH = {toxinidir}/src
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/dev-requirements.txt
commands= {[testenv:pytest]commands}
[flake8]
max-line-length = 120
select = C,E,F,W,B
# C812, W503 clash with black
ignore = C812,W503
[testenv:flake8]
commands = flake8
deps = flake8
[testenv:pytest]
commands=pytest {posargs}
[testenv:pylint]
commands = pylint --rcfile=.pylintrc src/aws_secretsmanager_caching
[testenv:docs]
changedir = {toxinidir}
description = invoke sphinx-build to build the HTML docs
commands = sphinx-build -d "{toxworkdir}/docs_doctree" doc "{toxworkdir}/docs_out" --color -bhtml {posargs}
python -c 'import pathlib; print("documentation available under file://\{0\}".format(pathlib.Path(r"{toxworkdir}") / "docs_out" / "index.html"))'