blob: ee7cbe0e6cc569cbb798215428ed20d38b6e4be5 [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]
8basepython = python3
9whitelist_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"
41commands =
42 /bin/bash -c "coala --non-interactive --disable-caching --no-autoapply-warn rst --files $(</tmp/.coalist_rst) \ "
43
44[testenv:md]
45commands_pre =
46 nodeenv -p --verbose
47 npm install --global remark-cli
48 /bin/sh -c "git --no-pager diff HEAD HEAD^ --name-only '*.md' > /tmp/.coalist_md"
49commands =
50 /bin/bash -c "coala --non-interactive --disable-caching --no-autoapply-warn md --files $(</tmp/.coalist_md) \ "
51