-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
86 lines (61 loc) · 1.72 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
[tox]
envlist = clean,
build-layers,
black,
flake8,
unit-tests
skipsdist = true
[pytest]
testpaths = tests
log_cli = true
log_cli_level = error
[testenv]
setenv =
test_dir = {toxinidir}/tests
REPORT_DIR = {toxinidir}/webdriver-report
allowlist_externals = docker
docker-compose
poetry
bash
skip_install = True
sitepackages = true
deps = uw-it-build-fingerprinter
[flake8]
max-line-length = 119
[testenv:clean]
allowlist_externals = rm
commands = /bin/bash -c "rm -rf {toxinidir}/webdriver-report/* {toxinidir}/htmlcov/"
[testenv:black]
deps = black
commands = black husky_directory tests
[testenv:build-layers]
commands = bash -c "set -x; $(fingerprinter -o build-script) -t tox {posargs} --build-arg HUSKY_DIRECTORY_VERSION=$(poetry version -s)"
[testenv:flake8]
deps = flake8
commands = flake8 husky_directory tests
[testenv:unit-tests]
passenv = pytest_args
setenv =
test_dir = {toxinidir}/tests
PYTHONPATH = {toxinidir}{:}{env:PYTHONPATH:}
pytest_args = {posargs}
commands = docker run \
-e pytest_args \
gcr.io/uwit-mci-iam/husky-directory.test-runner:tox
[testenv:development-server]
# The '-' here tells tox to ignore the exit code of the command,
# so it's less confusing for new developers.
passenv = UWCA_CERT_PATH
UWCA_CERT_NAME
setenv =
UWCA_CERT_PATH={env:UWCA_CERT_PATH}
UWCA_CERT_NAME={env:UWCA_CERT_NAME}
commands = - {toxinidir}/scripts/run-development-server.sh {posargs}
[coverage:report]
exclude_lines =
pragma: no cover
def __repr__
if self.\.debug
raise AssertionError
raise NotImplementedError
if __name__ == .__main_.: