blob: 9a019f4307a49e573112e2d4df7d5d0c84d92d08 [file] [log] [blame]
Bartek Grzybowskia9c32652021-03-19 10:28:49 +01001[tox]
2minversion = 3.2.0
3envlist = json,yaml,py,md
4skipsdist = true
5requires = pip >= 8
6
7[testenv]
8basepython = python3
9whitelist_externals =
10 git
11 bash
12deps =
13 coala-bears
14 nodeenv
15
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) \ "
31
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) \ "
37
38[testenv:md]
39commands_pre =
40 nodeenv -p --verbose
41 npm install --global remark-cli
42 /bin/sh -c "git --no-pager diff HEAD HEAD^ --name-only '*.md' > /tmp/.coalist_md"
43commands =
44 /bin/bash -c "coala --non-interactive --disable-caching --no-autoapply-warn md --files $(</tmp/.coalist_md) \ "