-
Notifications
You must be signed in to change notification settings - Fork 12
/
tox.ini
55 lines (48 loc) · 1.39 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
[tox]
envlist = docker
[testenv:docker]
whitelist_externals=docker
passenv =
PYTHON_VERSION
TOXENV
setenv =
PYTHON_VERSION=3.11
TOXENV=check,py311
deps =
usedevelop = false
depends =
skip_install = true
commands =
docker build --build-arg PYTHON_VERSION={env:PYTHON_VERSION} -t k8s_autoscale-{envname}-test -f Dockerfile.test .
docker run --rm -v {toxinidir}:/app -v k8s_autoscale-{envname}-tox:/app/.tox k8s_autoscale-{envname}-test {env:TOXENV}
[testenv]
depends = clean
setenv =
PYTHONDONTWRITEBYTECODE=1
PYTHONPATH = {toxinidir}/tests
usedevelop = true
deps =
-r {toxinidir}/requirements/test.txt
commands =
{posargs:py.test --cov-config=tox.ini --cov-append --cov=k8s_autoscale --cov-report term-missing tests}
[testenv:clean]
skip_install = true
deps = coverage
commands = coverage erase
depends =
[testenv:report]
skip_install = true
deps = coverage
commands = coverage report -m
depends = py311
parallel_show_output = true
[testenv:check]
commands =
black --diff --check {toxinidir}
isort --check -rc -df {toxinidir}
pip-compile-multi verify
check-manifest -v {toxinidir}
k8s_autoscale-verify --config {toxinidir}/configs/relengworker-nonprod/config.yml --schema {toxinidir}/configs/schema.yml
k8s_autoscale-verify --config {toxinidir}/configs/relengworker-prod/config.yml --schema {toxinidir}/configs/schema.yml
[coverage:run]
branch = true