blob: ee2b4c008fb439d1113dc8c754f7cab70c5a04ab [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"
mrichommea958b982020-04-13 18:46:35 +020041deps = -r ./docs/requirements-docs.txt
mrichommecd33b632020-04-09 18:38:07 +020042commands =
mrichommea958b982020-04-13 18:46:35 +020043 /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)"
mrichommecd33b632020-04-09 18:38:07 +020045
46[testenv:md]
47commands_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"
51commands =
52 /bin/bash -c "coala --non-interactive --disable-caching --no-autoapply-warn md --files $(</tmp/.coalist_md) \ "
53