update link to upper-constraints.txt
[integration.git] / tox.ini
1 [tox]
2 minversion = 3.2.0
3 envlist = json,yaml,py,rst,md
4 skipsdist = true
5 requires = pip >= 8
6
7 [testenv]
8 basepython = python3.8
9 allowlist_externals =
10   git
11   sh
12   /bin/sh
13   bash
14   /bin/bash
15 deps =
16   coala-bears
17   nodeenv
18
19 [testenv:json]
20 commands_pre =
21     /bin/sh -c "git --no-pager diff HEAD HEAD^ --name-only '*.json' > /tmp/.coalist_json"
22 commands =
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]
28 commands_pre =
29     /bin/sh -c "git --no-pager diff HEAD HEAD^ --name-only '*.yaml' '*.yml' > /tmp/.coalist_yaml"
30 commands =
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) \ "
34
35 [testenv:py]
36 commands_pre =
37     /bin/sh -c "git --no-pager diff HEAD HEAD^ --name-only '*.py' > /tmp/.coalist_py"
38 commands =
39     /bin/bash -c "coala --non-interactive --disable-caching --no-autoapply-warn py --files $(</tmp/.coalist_py) \ "
40
41 [testenv:rst]
42 deps =
43     -r{toxinidir}/docs/requirements-docs.txt
44     -chttps://raw.githubusercontent.com/openstack/requirements/stable/yoga/upper-constraints.txt
45     -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt
46 commands =
47   sphinx-build -W -n -b html docs docs/build/html
48   sphinx-build -W -n -b linkcheck docs docs/build/linkcheck
49
50 [testenv:md]
51 commands_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"
55 commands =
56     /bin/bash -c "coala --non-interactive --disable-caching --no-autoapply-warn md --files $(</tmp/.coalist_md) \ "