forked from devanshshukla99/sphinx-versioned-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
109 lines (95 loc) · 3.68 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
[tox]
envlist =
py{38,39,310}
legacy_build
codestyle
branch_selection
sphinx_rtd_theme
astropy_sphinx_theme
alabaster
requires =
setuptools >= 58.1.0
pip >= 23.0.1
isolated_build = true
# tests
# test codestyle
[codestyle]
changedir =
skip_install = true
description = check code style
deps =
black
commands =
black --color --diff --check {toxinidir}
# test a multi-commit repository with `sphinx_rtd_theme` and injection tests
[testenv]
# Windows compatibility GitPython/issues/356
passenv = USERNAME
changedir = .tmp/{envname}
description = build `sphinx_rtd_theme` with prebuild for a multi-commit git-repo
extras = tests
deps = sphinx_rtd_theme
commands =
python {toxinidir}/tests/cleanup.py
- sphinx-quickstart docs -p test-sphinx -a devanshshukla99 -v v1.0 --makefile --no-sep -r v1.0 -l en -q
python {toxinidir}/tests/prepare_multicommit_repo.py sphinx_rtd_theme
sphinx-versioned --no-quite --log=debug
pytest {toxinidir}/tests/test_multicommit_injection.py --verbose --tb=short {posargs}
# test against sphinx_rtd_theme with prebuild
[testenv:legacy_build]
changedir = .tmp/{envname}
description = build `sphinx_rtd_theme` with prebuild
extras = tests
deps = sphinx_rtd_theme
commands =
python {toxinidir}/tests/cleanup.py
- sphinx-quickstart docs -p test-sphinx -a devanshshukla99 -v v1.0 --makefile --no-sep -r v1.0 -l en -q
python {toxinidir}/tests/prepare_tox_build_docs.py sphinx_rtd_theme
sphinx-versioned --no-quite --log=debug
pytest {toxinidir}/tests/test_injection.py --verbose --tb=short {posargs}
# test themes
[testenv:branch_selection]
changedir = .tmp/{envname}
description = test sphinx_rtd_theme with branch_selection
extras = tests
deps = sphinx_rtd_theme
commands =
python {toxinidir}/tests/cleanup.py
- sphinx-quickstart docs -p test-sphinx -a devanshshukla99 -v v1.0 --makefile --no-sep -r v1.0 -l en -q
python {toxinidir}/tests/prepare_multicommit_repo.py sphinx_rtd_theme
sphinx-versioned --no-quite --log=debug --branch="main,v1.0,-v2.0"
pytest {toxinidir}/tests/test_branch_selection.py --verbose --tb=short {posargs}
# test themes
[testenv:sphinx_rtd_theme]
changedir = .tmp/{envname}
description = test sphinx_rtd_theme
extras = tests
deps = sphinx_rtd_theme
commands =
python {toxinidir}/tests/cleanup.py
- sphinx-quickstart docs -p test-sphinx -a devanshshukla99 -v v1.0 --makefile --no-sep -r v1.0 -l en -q
python {toxinidir}/tests/prepare_multicommit_repo.py sphinx_rtd_theme
sphinx-versioned --no-quite --log=debug
pytest {toxinidir}/tests/test_multicommit_injection.py --verbose --tb=short {posargs}
[testenv:astropy_sphinx_theme]
changedir = .tmp/{envname}
description = test astropy_sphinx_theme with floating badge
extras = tests
deps = astropy_sphinx_theme
commands =
python {toxinidir}/tests/cleanup.py
- sphinx-quickstart docs -p test-sphinx -a devanshshukla99 -v v1.0 --makefile --no-sep -r v1.0 -l en -q
python {toxinidir}/tests/prepare_multicommit_repo.py bootstrap-astropy
sphinx-versioned --no-quite --log=debug --floating-badge
pytest {toxinidir}/tests/test_multicommit_injection.py --verbose --tb=short {posargs}
pytest {toxinidir}/tests/test_floating_badge.py --verbose --tb=short {posargs}
[testenv:alabaster]
changedir = .tmp/{envname}
description = test alabaster theme
extras = tests
commands =
python {toxinidir}/tests/cleanup.py
- sphinx-quickstart docs -p test-sphinx -a devanshshukla99 -v v1.0 --makefile --no-sep -r v1.0 -l en -q
python {toxinidir}/tests/prepare_multicommit_repo.py alabaster
sphinx-versioned --no-quite --log=debug
pytest {toxinidir}/tests/test_multicommit_injection.py --verbose --tb=short {posargs}