-
Notifications
You must be signed in to change notification settings - Fork 66
/
Copy pathtox.ini
67 lines (62 loc) · 2.32 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
[tox]
env_list = docs-lint,pre-commit,py
[testenv:pre-commit]
package = wheel
wheel_build_env = .pkg
extras = dev
commands = pre-commit run --all-files --show-diff-on-failure --color=always
[testenv:py{,38,39,310,311,312}{,-ci}]
package = wheel
wheel_build_env = .pkg
depends: pre-commit
extras = dev
allowlist_externals = docker
setenv =
DOCKER_ARGS = {env:DOCKER_ARGS:--rm -d --name qbt-tox-testing --pull=always --publish 8080:8080 --volume {tox_root}/tests/_resources:/tmp/_resources}
DOCKER_QBT_IMAGE_NAME = {env:DOCKER_IMAGE_NAME:ghcr.io/rmartin16/qbittorrent-nox}
DOCKER_QBT_IMAGE_TAG = {env:DOCKER_QBT_IMAGE_TAG:master-debug}
passenv = CI # needed for test_shutdown()
commands_pre = !ci: -docker stop qbt-tox-testing
commands =
!ci: docker run {env:DOCKER_ARGS} {env:DOCKER_QBT_IMAGE_NAME}:{env:DOCKER_QBT_IMAGE_TAG}
!ci: python -Xdev -m pytest {posargs:-vv --color=yes}
ci: python -Xdev -m coverage run -m pytest {posargs:-vv --color=yes}
commands_post = !ci: docker stop qbt-tox-testing
[docs]
source_dir = source
build_dir = _build
# -W: make warnings into errors
# --keep-going: continue on errors
# -j: run with multiple processes
# -n: nitpick mode
sphinx_args = -W --keep-going -j auto -n
# -v: verbose logging
# -E: force rebuild of environment
# -T: print traceback on error
# -a: read/parse all files
# -d: use tox's temp dir for caching
sphinx_args_extra = {[docs]sphinx_args} -v -E -T -a -d {envtmpdir}/doctrees
[testenv:docs{,-lint,-all,-man}]
base_python = py311
package = wheel
wheel_build_env = .pkg
change_dir = docs
passenv = FORCE_COLOR
extras = dev
commands =
!lint-!all-!man : python -m sphinx {[docs]sphinx_args} -b html ./{[docs]source_dir} {[docs]build_dir}/html
lint : python -m sphinx {[docs]sphinx_args_extra} -b linkcheck ./{[docs]source_dir} {[docs]build_dir}/links
lint : python -m sphinx {[docs]sphinx_args_extra} -b spelling ./{[docs]source_dir} {[docs]build_dir}/spell
all : python -m sphinx {[docs]sphinx_args_extra} -b html ./{[docs]source_dir} {[docs]build_dir}/html
man : python -m sphinx {[docs]sphinx_args_extra} -b man ./{[docs]source_dir} {[docs]build_dir}/man
[testenv:package]
skip_install = True
passenv = FORCE_COLOR
deps =
check_manifest
build
twine
commands =
check-manifest -v
python -m build --outdir dist/ .
python -m twine check dist/*