forked from opsdroid/opsdroid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
54 lines (49 loc) · 1.48 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
[tox]
envlist = py36, py37, py38, lint, docker
skip_missing_interpreters = True
[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38
[testenv]
setenv =
LANG=en_US.UTF-8
PYTHONPATH = {toxinidir}
commands =
py.test -v --timeout=30 --cov=opsdroid --cov-report term-missing:skip-covered --cov-report=xml:cov.xml {posargs}
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/requirements_test.txt
[testenv:docker]
basepython = python3
ignore_errors = True
whitelist_externals =
docker
bash
commands =
docker build -t opsdroid-image:tmp .
docker run -it -d --name opsdroid-container opsdroid-image:tmp
sleep 10
docker exec opsdroid-container sh -c "apk add --no-cache curl && curl -sSf http://localhost:8080/ || exit 1"
docker logs opsdroid-container
docker stop opsdroid-container
docker rm opsdroid-container
docker rmi opsdroid-image:tmp
[testenv:docs]
basepython = python3
ignore_errors = True
whitelist_externals = sh
commands =
sphinx-build -W -b html docs/ docs/_build/
; running python's http server to serve documentation on 127.0.0.1:3001
sh -c 'cd docs/_build && python -m http.server 3001 2>&1 > /dev/null &'
; checking liveness
deadlinks http://127.0.0.1:3001/ -n 10 -r 3 --no-progress --fiff
[testenv:lint]
basepython = python3
ignore_errors = True
commands =
flake8 --builtins='_' opsdroid
pydocstyle opsdroid tests
black --check opsdroid tests scripts setup.py versioneer.py