-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathtox.ini
87 lines (80 loc) · 1.95 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
87
[tox]
envlist = mypy,semgrep,py3,docs
requires =
poetry
[testenv]
basepython = python3.13
allowlist_externals = poetry
skip_install = true
no_package = true
setenv =
GREENWAVE_CONFIG={toxinidir}/conf/settings.py.example
[testenv:py3]
commands_pre =
poetry install --only=main --extras=test
commands =
pytest \
--cov-reset \
--cov-config=.coveragerc \
--cov=. \
--cov-report=term \
--cov-report=xml \
--cov-report=html \
--ignore=functional-tests \
{posargs}
[testenv:functional]
commands_pre =
poetry install --only=main --extras=test --extras=functional-test
setenv =
GREENWAVE_TEST_URL=http://localhost:8080/
WAIVERDB_TEST_URL=http://localhost:5004/
RESULTSDB_TEST_URL=http://localhost:5001/
allowlist_externals =
poetry
docker/healthcheck.sh
commands =
docker/healthcheck.sh
pytest \
--cov-reset \
--cov-config=.coveragerc \
--cov=. \
--cov-report=term \
--cov-report=xml \
--cov-report=html \
{posargs}
[testenv:bandit]
deps =
bandit
commands =
bandit \
# B113:request_without_timeout is broken:
# https://github.com/PyCQA/bandit/issues/996
--skip B113 \
--exclude functional-tests,greenwave/tests \
--recursive greenwave
[testenv:semgrep]
deps =
semgrep
commands =
semgrep scan --config=auto --error \
--exclude-rule=python.lang.security.insecure-uuid-version.insecure-uuid-version \
--exclude=docker-compose.yml \
--exclude=".*" \
{posargs}
[testenv:docs]
changedir = docs
commands_pre =
poetry install --only=main --extras=docs
allowlist_externals =
poetry
mkdir
rm
commands=
mkdir -p _static
rm -rf _build/
sphinx-build -W -b html -d {envtmpdir}/doctrees . _build/html
[testenv:mypy]
deps =
mypy
commands =
mypy -p greenwave --install-types --non-interactive --ignore-missing-imports