11 skip_missing_interpreters = true
12 ignore_basepython_conflict = true
17 ignore = E203, W503, C901, E402, B011
24 addopts = -p no:warnings
28 deps = -r{toxinidir}/requirements-test.txt
33 description = Build the documentation with sphinx
35 deps = -rrequirements-docs.txt
37 commands = sphinx-build -W -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
39 [testenv:docs-linkcheck]
40 description = Check the documentation links with sphinx
42 deps = -rrequirements-docs.txt
44 commands = sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck
46 [testenv:latest-upstream]
47 description = Latest upstream test. Used for what exactly?
49 deps = -r{toxinidir}/requirements-test.txt
51 pip install -U python-jenkins requests shade
55 description = Check all files for license header
59 lftools license check-dir lftools
60 lftools license check-dir -r '.+' shell
63 description = Precommit checks for black, gitlint, etc.
71 pre-commit run --all-files --show-diff-on-failure
72 /bin/sh -c 'if ! git config --get user.name > /dev/null; then \
73 git config --global --add user.name "CI"; \
74 touch .git/REMOVE_USERNAME; fi'
75 /bin/sh -c 'if ! git config --get user.email > /dev/null; then \
76 git config --global --add user.email "ci@example.org"; \
77 touch .git/REMOVE_USEREMAIL; fi'
78 /bin/sh -c "if [ -f .git/COMMIT_EDITMSG ]; then \
79 cp .git/COMMIT_EDITMSG .git/COMMIT_MSGTOX; else \
80 git log HEAD -n1 --pretty=%B > .git/COMMIT_MSGTOX; fi"
81 pre-commit run gitlint --hook-stage commit-msg --commit-msg-filename .git/COMMIT_MSGTOX
82 /bin/sh -c "rm -f .git/COMMIT_MSGTOX"
83 /bin/sh -c "if [ -f .git/REMOVE_USERNAME ]; then \
84 git config --global --unset user.name; \
85 rm -f .git/REMOVE_USERNAME; fi"
86 /bin/sh -c "if [ -f .git/REMOVE_USEREMAIL ]; then \
87 git config --global --unset user.email; \
88 rm -f .git/REMOVE_USEREMAIL; fi"
91 description = OpenStack Reno checks
94 commands = reno {posargs:--help}