-
Notifications
You must be signed in to change notification settings - Fork 3
/
tox.ini
64 lines (59 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
[tox]
minversion = 1.6
envlist =
docs,
docs-linkcheck,
pre-commit,
lint
skipsdist = true
[testenv:docs]
basepython = python3
deps = -rdocs/requirements.txt
commands =
sphinx-build -W -b html -n -W -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
whitelist_externals = echo
[testenv:docs-linkcheck]
basepython = python3
deps = -rdocs/requirements.txt
commands = sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck
[testenv:pre-commit]
basepython = python3
allowlist_externals =
/bin/sh
deps =
pre-commit
passenv = HOME
commands =
pre-commit run --all-files --show-diff-on-failure
/bin/sh -c 'if ! git config --get user.name > /dev/null; then \
git config --global --add user.name "CI"; \
touch .git/REMOVE_USERNAME; fi'
/bin/sh -c 'if ! git config --get user.email > /dev/null; then \
git config --global --add user.email "[email protected]"; \
touch .git/REMOVE_USEREMAIL; fi'
/bin/sh -c "if [ -f .git/COMMIT_EDITMSG ]; then \
cp .git/COMMIT_EDITMSG .git/COMMIT_MSGTOX; else \
git log HEAD -n1 --pretty=%B > .git/COMMIT_MSGTOX; fi"
pre-commit run gitlint --hook-stage commit-msg --commit-msg-filename .git/COMMIT_MSGTOX
/bin/sh -c "rm -f .git/COMMIT_MSGTOX"
/bin/sh -c "if [ -f .git/REMOVE_USERNAME ]; then \
git config --global --unset user.name; \
rm -f .git/REMOVE_USERNAME; fi"
/bin/sh -c "if [ -f .git/REMOVE_USEREMAIL ]; then \
git config --global --unset user.email; \
rm -f .git/REMOVE_USEREMAIL; fi"
[testenv:reno]
basepython = python3
deps = -rdocs/requirements.txt
commands = reno {posargs:--help}
[testenv:lint]
basepython = python310
deps =
ansible-lint
yamllint
commands =
/bin/bash -c "ansible-lint --exclude meta provision/*.yaml"
yamllint .
allowlist_externals =
/bin/bash
yamllint