forked from opsdroid/opsdroid
-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
66 lines (60 loc) · 1.78 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
58
59
60
61
62
63
64
65
66
[tox]
envlist = py{37,38,39,310}{,-e2e,-noe2e}, lint, docker-{full,min}
skip_missing_interpreters = True
[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
[gh-actions:env]
PLATFORM =
Linux: e2e
macOS: e2e
Windows: noe2e
[testenv]
setenv =
LANG=en_US.UTF-8
PYTHONPATH = {toxinidir}
commands =
pytest --timeout=30 --cov=opsdroid --cov-report=xml:cov.xml --cov-report term-missing:skip-covered {posargs}
pytest --timeout=10 --only-signal-tests --cov-append --cov=opsdroid --cov-report=xml:cov.xml --cov-report term-missing:skip-covered {posargs}
extras =
all
test
e2e-!noe2e: connector_matrix_e2e
[testenv:docker-{full,min}]
basepython = python3
skip_install = true
ignore_errors = True
whitelist_externals =
docker
bash
sleep
commands =
min: docker build --build-arg EXTRAS= -t opsdroid-image:tmp .
full: docker build -t opsdroid-image:tmp .
docker run -it -d --name opsdroid-container opsdroid-image:tmp
sleep 10
docker exec --user root 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.8
changedir = docs
ignore_errors = True
whitelist_externals = sh
commands =
sphinx-build --color -W --keep-going -b html . _build/ {posargs}
; running python's http server to serve documentation on 127.0.0.1:3001
sh -c 'cd _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
skip_install = true
deps =
pre-commit
commands =
pre-commit run --all-files