Update download page for P SR1
[docs.git] / tox.ini
1 [tox]
2 minversion = 1.6
3 envlist = pre-commit,gitlint,docs,docs-linkcheck,spelling
4 skipsdist = true
5
6 [testenv:docs]
7 basepython = python3
8 deps = -rdocs/requirements.txt
9 commands =
10     sphinx-build -q -j auto -W -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
11
12 [testenv:docs-linkcheck]
13 basepython = python3
14 deps = -rdocs/requirements.txt
15 commands = sphinx-build -q -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck
16
17 [testenv:pre-commit-install]
18 basepython = python3
19 deps = pre-commit
20 commands =
21     pre-commit install
22     pre-commit install --hook-type commit-msg
23
24 [testenv:pre-commit-uninstall]
25 basepython = python3
26 deps = pre-commit
27 commands =
28     pre-commit uninstall
29     pre-commit uninstall --hook-type commit-msg
30
31 [testenv:pre-commit]
32 basepython = python3
33 deps = pre-commit
34 passenv = HOME
35 commands =
36     pre-commit run --all-files --show-diff-on-failure
37     pre-commit run gitlint --hook-stage commit-msg --commit-msg-filename .git/COMMIT_EDITMSG
38     # Gitlint only proposes a pre-commit configuration for the commit-msg stage but none for the commit stage.
39     # Its default arguments --passed and --msg-filename are different from CI recommandations.
40     # As a result, the line above is skipped in jenkins CI since there cannot be a .git/COMMIT_EDITMSG file
41     # and the HOME variable must be passed to tox virtualenv so that Gitlint can access the git user configuration.
42     # A dedicated gitlint profile for CI is proposed below.
43
44 [testenv:gitlint]
45 basepython = python3
46 deps = gitlint
47 commands =
48     gitlint
49
50 [testenv:spelling]
51 basepython = python3
52 deps =
53     -rdocs/requirements.txt
54     sphinxcontrib-spelling
55     PyEnchant
56 whitelist_externals = sh
57 commands =
58     sh -c 'command enchant>/dev/null || command enchant-2 -v>/dev/null || sudo yum -y install enchant || (echo "enchant command not found - please install it (e.g. sudo apt-get install enchant | yum install enchant )" >&2 && exit 1)'
59     sphinx-build -q -W -b spelling -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/spelling
60