summaryrefslogtreecommitdiffstats
path: root/tox.ini
blob: 7ebbddc4b228486a8145e552b5d45b98a37c5485 (plain)
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
; SPDX-FileCopyrightText: 2021 Anuket contributors
;
; SPDX-License-Identifier: Apache-2.0

[tox]
minversion = 3.5
skipsdist = True
envlist = lint,docs

[testenv]
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY

[testenv:lint]
deps =
   -r{toxinidir}/test-requirements.txt
whitelist_externals = bash
commands = bash -c "find {toxinidir} \
   -not -path {toxinidir}/.tox/\* \
   -not -path {toxinidir}/.venv/\* \
# E006 check for lines longer than 79 columns
   -name \*.sh | xargs bashate -v -iE006"
   bash -c "yamllint {toxinidir}"
   bash -c "find {toxinidir} \
   -not -path {toxinidir}/.tox/\* \
   -name \*.rst | xargs rstcheck"

[testenv:docs]
deps = -rdocs/requirements.txt
commands =
    sphinx-build -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
    echo "Generated docs available in {toxinidir}/docs/_build/html"
whitelist_externals = echo

[testenv:docs-linkcheck]
deps = -rdocs/requirements.txt
commands = sphinx-build -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck