Bartek Grzybowski | 76c43bf | 2020-02-28 14:09:43 +0100 | [diff] [blame] | 1 | [tox] |
| 2 | minversion = 3.2.0 |
Bartek Grzybowski | 13de1c6 | 2020-03-06 14:20:07 +0100 | [diff] [blame] | 3 | envlist = json,yaml,py |
Bartek Grzybowski | 76c43bf | 2020-02-28 14:09:43 +0100 | [diff] [blame] | 4 | skipsdist = true |
| 5 | requires = pip >= 8 |
| 6 | |
| 7 | [testenv] |
| 8 | basepython = python3 |
| 9 | whitelist_externals = |
| 10 | git |
| 11 | bash |
| 12 | deps = |
| 13 | coala-bears |
| 14 | |
| 15 | [testenv:json] |
| 16 | commands_pre = |
| 17 | /bin/sh -c "git --no-pager diff HEAD HEAD^ --name-only '*.json' > /tmp/.coalist_json" |
| 18 | commands = |
| 19 | # '\ ' at the end of command is needed for a case where above command returns empty list (it adds empty file |
| 20 | # parameter to '--files' opt |
| 21 | /bin/bash -c "coala --non-interactive --disable-caching --no-autoapply-warn json --files $(</tmp/.coalist_json) \ " |
| 22 | |
| 23 | [testenv:yaml] |
| 24 | commands_pre = |
| 25 | /bin/sh -c "git --no-pager diff HEAD HEAD^ --name-only '*.yaml' '*.yml' > /tmp/.coalist_yaml" |
| 26 | commands = |
| 27 | # '\ ' at the end of command is needed for a case where above command returns empty list (it adds empty file |
| 28 | # parameter to '--files' opt |
| 29 | /bin/bash -c "coala --non-interactive --disable-caching --no-autoapply-warn yaml --files $(</tmp/.coalist_yaml) \ " |
Bartek Grzybowski | 13de1c6 | 2020-03-06 14:20:07 +0100 | [diff] [blame] | 30 | |
| 31 | [testenv:py] |
| 32 | commands_pre = |
| 33 | /bin/sh -c "git --no-pager diff HEAD HEAD^ --name-only '*.py' > /tmp/.coalist_py" |
| 34 | commands = |
| 35 | /bin/bash -c "coala --non-interactive --disable-caching --no-autoapply-warn py --files $(</tmp/.coalist_py) \ " |