Bartek Grzybowski | 76c43bf | 2020-02-28 14:09:43 +0100 | [diff] [blame] | 1 | [tox] |
| 2 | minversion = 3.2.0 |
mrichomme | cd33b63 | 2020-04-09 18:38:07 +0200 | [diff] [blame] | 3 | envlist = json,yaml,py,rst,md |
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 |
mrichomme | cd33b63 | 2020-04-09 18:38:07 +0200 | [diff] [blame] | 14 | nodeenv |
Bartek Grzybowski | 76c43bf | 2020-02-28 14:09:43 +0100 | [diff] [blame] | 15 | |
| 16 | [testenv:json] |
| 17 | commands_pre = |
| 18 | /bin/sh -c "git --no-pager diff HEAD HEAD^ --name-only '*.json' > /tmp/.coalist_json" |
| 19 | commands = |
| 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] |
| 25 | commands_pre = |
| 26 | /bin/sh -c "git --no-pager diff HEAD HEAD^ --name-only '*.yaml' '*.yml' > /tmp/.coalist_yaml" |
| 27 | commands = |
| 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 Grzybowski | 13de1c6 | 2020-03-06 14:20:07 +0100 | [diff] [blame] | 31 | |
| 32 | [testenv:py] |
| 33 | commands_pre = |
| 34 | /bin/sh -c "git --no-pager diff HEAD HEAD^ --name-only '*.py' > /tmp/.coalist_py" |
| 35 | commands = |
| 36 | /bin/bash -c "coala --non-interactive --disable-caching --no-autoapply-warn py --files $(</tmp/.coalist_py) \ " |
mrichomme | cd33b63 | 2020-04-09 18:38:07 +0200 | [diff] [blame] | 37 | |
| 38 | [testenv:rst] |
| 39 | commands_pre = |
| 40 | /bin/sh -c "git --no-pager diff HEAD HEAD^ --name-only '*.rst' > /tmp/.coalist_rst" |
mrichomme | a958b98 | 2020-04-13 18:46:35 +0200 | [diff] [blame] | 41 | deps = -r ./docs/requirements-docs.txt |
mrichomme | cd33b63 | 2020-04-09 18:38:07 +0200 | [diff] [blame] | 42 | commands = |
mrichomme | a958b98 | 2020-04-13 18:46:35 +0200 | [diff] [blame] | 43 | /bin/sh -c "sphinx-build -n -b html docs docs/build/html $(</tmp/.coalist_rst)" |
| 44 | /bin/sh -c "sphinx-build -n -b linkcheck docs docs/build/linkcheck $(</tmp/.coalist_rst)" |
mrichomme | cd33b63 | 2020-04-09 18:38:07 +0200 | [diff] [blame] | 45 | |
| 46 | [testenv:md] |
| 47 | commands_pre = |
| 48 | nodeenv -p --verbose |
| 49 | npm install --global remark-cli |
| 50 | /bin/sh -c "git --no-pager diff HEAD HEAD^ --name-only '*.md' > /tmp/.coalist_md" |
| 51 | commands = |
| 52 | /bin/bash -c "coala --non-interactive --disable-caching --no-autoapply-warn md --files $(</tmp/.coalist_md) \ " |
| 53 | |