-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtox.ini
75 lines (66 loc) · 1.88 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
68
69
70
71
72
73
74
75
[tox]
minversion = 3.1
envlist = py39,pep8
skipsdist = True
ignore_basepython_conflict = True
[testenv]
usedevelop = True
install_command = pip install {opts} {packages}
deps =
-r{toxinidir}/requirements.txt
commands = stestr run {posargs}
stestr slowest
[testenv:pep8]
commands =
doc8 doc/source README.rst
[testenv:venv]
deps =
-r{toxinidir}/requirements.txt
commands = {posargs}
# This env is invoked in the periodic pipeline and is therefore responsible to
# build all relevant docs at once.
[testenv:docs]
deps =
-r{toxinidir}/doc/requirements.txt
-c https://raw.githubusercontent.com/opentelekomcloud-docs/docs-constraints/main/constraints.txt
allowlist_externals =
mkdir
cp
sh
rm
sphinx-build
commands =
rm -rf doc/build/html doc/build/html_temp doc/build/doctrees
sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html_temp
sphinx-minify --input-directory doc/build/html_temp/ --output-directory doc/build/html
[testenv:docs-pdf]
deps =
{[testenv:docs]deps}
{[testenv:bindeps]deps}
allowlist_externals =
rm
mkdir
wget
make
bash
cp
commands =
mkdir -p doc/build/pdf
{[testenv:bindeps]commands}
[testenv:bindeps]
deps =
bindep
allowlist_externals =
wget
rm
bash
commands =
rm -rf {toxinidir}/bindep.txt
rm -rf {toxinidir}/packages.txt
wget -O {toxinidir}/bindep.txt https://raw.githubusercontent.com/opentelekomcloud/otcdocstheme/main/bindep.txt
bash -c "bindep test -b -f {toxinidir}/bindep.txt > {toxinidir}/packages.txt || true"
bash -c 'if [ -s {toxinidir}/packages.txt ]; then if command -v apt &>/dev/null; then apt update && xargs apt install --no-install-recommends -y < {toxinidir}/packages.txt; fi; fi'
bash -c 'if [ -s {toxinidir}/packages.txt ]; then if command -v dnf &>/dev/null; then dnf install -y $(cat {toxinidir}/packages.txt); fi; fi'
[doc8]
ignore = D001
extensions = .rst, .yaml