blob: cdc65959c02a89bd42c9c98026307e0d6e89c661 [file] [log] [blame]
Bartek Grzybowski76c43bf2020-02-28 14:09:43 +01001[tox]
2minversion = 3.2.0
mrichommecd33b632020-04-09 18:38:07 +02003envlist = json,yaml,py,rst,md
Bartek Grzybowski76c43bf2020-02-28 14:09:43 +01004skipsdist = true
5requires = pip >= 8
6
7[testenv]
Lukasz Rajewski7ef4f9b2022-09-21 11:26:15 +02008basepython = python3.8
Marek Szwałkiewicz0cde2372023-04-13 13:59:29 +02009allowlist_externals =
Bartek Grzybowski76c43bf2020-02-28 14:09:43 +010010 git
Marek Szwałkiewicz0cde2372023-04-13 13:59:29 +020011 sh
12 /bin/sh
Bartek Grzybowski76c43bf2020-02-28 14:09:43 +010013 bash
Marek Szwałkiewicz0cde2372023-04-13 13:59:29 +020014 /bin/bash
Bartek Grzybowski76c43bf2020-02-28 14:09:43 +010015deps =
16 coala-bears
mrichommecd33b632020-04-09 18:38:07 +020017 nodeenv
Bartek Grzybowski76c43bf2020-02-28 14:09:43 +010018
19[testenv:json]
20commands_pre =
21 /bin/sh -c "git --no-pager diff HEAD HEAD^ --name-only '*.json' > /tmp/.coalist_json"
22commands =
23# '\ ' at the end of command is needed for a case where above command returns empty list (it adds empty file
24# parameter to '--files' opt
25 /bin/bash -c "coala --non-interactive --disable-caching --no-autoapply-warn json --files $(</tmp/.coalist_json) \ "
26
27[testenv:yaml]
28commands_pre =
29 /bin/sh -c "git --no-pager diff HEAD HEAD^ --name-only '*.yaml' '*.yml' > /tmp/.coalist_yaml"
30commands =
31# '\ ' at the end of command is needed for a case where above command returns empty list (it adds empty file
32# parameter to '--files' opt
33 /bin/bash -c "coala --non-interactive --disable-caching --no-autoapply-warn yaml --files $(</tmp/.coalist_yaml) \ "
Bartek Grzybowski13de1c62020-03-06 14:20:07 +010034
35[testenv:py]
36commands_pre =
37 /bin/sh -c "git --no-pager diff HEAD HEAD^ --name-only '*.py' > /tmp/.coalist_py"
38commands =
39 /bin/bash -c "coala --non-interactive --disable-caching --no-autoapply-warn py --files $(</tmp/.coalist_py) \ "
mrichommecd33b632020-04-09 18:38:07 +020040
41[testenv:rst]
Cédric Ollivierd6b0c102021-09-28 14:17:04 +020042deps =
43 -r{toxinidir}/docs/requirements-docs.txt
Lukasz Rajewski7ef4f9b2022-09-21 11:26:15 +020044 -chttps://raw.githubusercontent.com/openstack/requirements/stable/yoga/upper-constraints.txt
Cédric Ollivier6f357042021-09-29 16:27:06 +020045 -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt
mrichommecd33b632020-04-09 18:38:07 +020046commands =
Michal Jagiello8f5d1542023-03-24 12:30:38 +000047 sphinx-build -W -n -b html docs docs/build/html
48 sphinx-build -W -n -b linkcheck docs docs/build/linkcheck
mrichommecd33b632020-04-09 18:38:07 +020049
50[testenv:md]
51commands_pre =
52 nodeenv -p --verbose
53 npm install --global remark-cli
54 /bin/sh -c "git --no-pager diff HEAD HEAD^ --name-only '*.md' > /tmp/.coalist_md"
55commands =
56 /bin/bash -c "coala --non-interactive --disable-caching --no-autoapply-warn md --files $(</tmp/.coalist_md) \ "