/
tox.ini
45 lines (42 loc) · 1.2 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
[tox]
minversion = 4.0
envlist =
py{39,310,311,312}
codestyle
linkcheck
[testenv]
pass_env =
# A variable to tell tests we are on a CI system
CI
# Custom compiler locations (such as ccache)
CC
# Location of locales (needed by sphinx on some systems)
LOCALE_ARCHIVE
# If the user has set a LC override we should follow it
LC_ALL
skip_install = true
allowlist_externals=
/bin/bash
/bin/make
/usr/bin/bash
/usr/bin/linkcheck
/usr/bin/make
description = Invoke sphinx-build to build the website.
deps =
-r{toxinidir}/requirements.txt
commands =
pip freeze --all --no-input
sphinx-build --color -W --keep-going -b html -d _build/ . _build/html {posargs}
python -c 'import pathlib; print("Documentation available under file://\{0\}".format(pathlib.Path("{toxinidir}") / "_build" / "html" / "index.html"))'
# Note this does not check the html file links.
[testenv:linkcheck]
commands =
pip freeze --all --no-input
make linkcheck
[testenv:codestyle]
description = Run all style and file checks with pre-commit
deps =
pre-commit
commands =
pre-commit install-hooks
pre-commit run --color always --all-files --show-diff-on-failure