forked from ptwikis/wikiloves
-
Notifications
You must be signed in to change notification settings - Fork 6
/
tox.ini
46 lines (40 loc) · 1.14 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
[tox]
envlist =
bashate,isort,jsonlint,flake8,py39,ansible-lint
skipsdist = True
[testenv]
basepython = python3.9
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/requirements-dev.txt
commands = nosetests {posargs}
whitelist_externals = bash
[testenv:bashate]
deps = bashate==0.5.1
commands =
bash -c "grep --recursive --binary-files=without-match \
--files-with-match '^.!.*\(ba\)\?sh$' \
--exclude-dir .tox \
--exclude-dir .git \
{toxinidir} | xargs bashate --error . --verbose"
[testenv:isort]
deps = isort==4.2.15
commands =
bash -c "find {toxinidir} \
-type d \
\( \
-path {toxinidir}/.git -o \
-path {toxinidir}/.tox -o \
-path {toxinidir}/.venv \
\) -prune -o \
-name '*.py' \
-print | xargs isort {posargs:--check-only} --verbose"
[testenv:jsonlint]
commands =
bash -c "set -euo pipefail && find conf/ -type f -name '*.json' | xargs -t -n1 python -m json.tool 2>&1 > /dev/null"
[testenv:flake8]
deps = flake8
commands = flake8
[testenv:ansible-lint]
deps = ansible-lint
commands = ansible-lint deploy/main.yml