blob: 49eb054df55d67bdf6fed217200758dc681dc2af [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]
Marek Szwałkiewicz80ba8962024-08-26 11:57:37 +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
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 =
Michal Jagiello8f5d1542023-03-24 12:30:38 +000046 sphinx-build -W -n -b html docs docs/build/html
47 sphinx-build -W -n -b linkcheck docs docs/build/linkcheck
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) \ "