blob: f2bad2719e20381fead4f18f0a2c1e2b77d031a4 [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
Bartek Grzybowski76c43bf2020-02-28 14:09:43 +01009whitelist_externals =
10 git
11 bash
12deps =
13 coala-bears
mrichommecd33b632020-04-09 18:38:07 +020014 nodeenv
Bartek Grzybowski76c43bf2020-02-28 14:09:43 +010015
16[testenv:json]
17commands_pre =
18 /bin/sh -c "git --no-pager diff HEAD HEAD^ --name-only '*.json' > /tmp/.coalist_json"
19commands =
20# '\ ' at the end of command is needed for a case where above command returns empty list (it adds empty file
21# parameter to '--files' opt
22 /bin/bash -c "coala --non-interactive --disable-caching --no-autoapply-warn json --files $(</tmp/.coalist_json) \ "
23
24[testenv:yaml]
25commands_pre =
26 /bin/sh -c "git --no-pager diff HEAD HEAD^ --name-only '*.yaml' '*.yml' > /tmp/.coalist_yaml"
27commands =
28# '\ ' at the end of command is needed for a case where above command returns empty list (it adds empty file
29# parameter to '--files' opt
30 /bin/bash -c "coala --non-interactive --disable-caching --no-autoapply-warn yaml --files $(</tmp/.coalist_yaml) \ "
Bartek Grzybowski13de1c62020-03-06 14:20:07 +010031
32[testenv:py]
33commands_pre =
34 /bin/sh -c "git --no-pager diff HEAD HEAD^ --name-only '*.py' > /tmp/.coalist_py"
35commands =
36 /bin/bash -c "coala --non-interactive --disable-caching --no-autoapply-warn py --files $(</tmp/.coalist_py) \ "
mrichommecd33b632020-04-09 18:38:07 +020037
38[testenv:rst]
39commands_pre =
40 /bin/sh -c "git --no-pager diff HEAD HEAD^ --name-only '*.rst' > /tmp/.coalist_rst"
Cédric Ollivierd6b0c102021-09-28 14:17:04 +020041deps =
42 -r{toxinidir}/docs/requirements-docs.txt
Lukasz Rajewski7ef4f9b2022-09-21 11:26:15 +020043 -chttps://raw.githubusercontent.com/openstack/requirements/stable/yoga/upper-constraints.txt
Cédric Ollivier6f357042021-09-29 16:27:06 +020044 -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt
mrichommecd33b632020-04-09 18:38:07 +020045commands =
mrichommea958b982020-04-13 18:46:35 +020046 /bin/sh -c "sphinx-build -n -b html docs docs/build/html $(</tmp/.coalist_rst)"
47 /bin/sh -c "sphinx-build -n -b linkcheck docs docs/build/linkcheck $(</tmp/.coalist_rst)"
mrichommecd33b632020-04-09 18:38:07 +020048
49[testenv:md]
50commands_pre =
51 nodeenv -p --verbose
52 npm install --global remark-cli
53 /bin/sh -c "git --no-pager diff HEAD HEAD^ --name-only '*.md' > /tmp/.coalist_md"
54commands =
55 /bin/bash -c "coala --non-interactive --disable-caching --no-autoapply-warn md --files $(</tmp/.coalist_md) \ "