-
Notifications
You must be signed in to change notification settings - Fork 13
/
tox.ini
57 lines (50 loc) · 1.75 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
47
48
49
50
51
52
53
54
55
56
57
[tox]
minversion = 3.2.0
envlist = flake8,coverage,black-format,black-check
ignore_basepython_conflict = true
[testenv]
basepython = python3
usedevelop = True
install_command = pip install {opts} {packages}
deps =
-r {toxinidir}/test-requirements.txt
.[all]
[testenv:venv]
commands = {posargs}
[testenv:flake8]
commands =
flake8 . --count \
--show-source \
--max-complexity=35 \
--max-line-length=79 \
--statistics \
--benchmark \
--ignore=W503,D100,D101,D104,D105,D107,D202,D401 \
--exclude build,directord/tests,directord/drivers/generated,.tox
[testenv:coverage]
commands =
coverage run -a -m unittest {posargs}
coverage report -m --no-skip-covered --skip-empty --fail-under=55 --omit='build/*,directord/tests/*,directord/drivers/generated/*,.tox/*'
[testenv:black-check]
commands =
black --line-length 79 --safe --target-version py38 --check --extend-exclude "/(directord/drivers/generated)/" .
[testenv:black-format]
commands =
black --line-length 79 --safe --target-version py38 --extend-exclude "/(directord/drivers/generated)/" .
[testenv:docs]
allowlist_externals=podman
changedir={toxinidir}/docs
commands =
podman run --rm \
--env PAGES_REPO_NWO=directord/directord \
--env JEKYLL_ROOTLESS=1 \
--volume="{toxinidir}/docs:/srv/jekyll:Z" \
-it docker.io/jekyll/jekyll:latest \
jekyll build
podman run --rm \
--env PAGES_REPO_NWO=directord/directord \
--env JEKYLL_ROOTLESS=1 \
--volume="{toxinidir}/docs/_site:/srv/jekyll:Z" \
--publish 127.0.0.1:4000:4000 \
jekyll/jekyll \
jekyll serve