-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathtox.ini
More file actions
85 lines (78 loc) · 1.93 KB
/
tox.ini
File metadata and controls
85 lines (78 loc) · 1.93 KB
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
[tox]
envlist = mypy,semgrep,py3,docs
requires =
uv
[testenv]
basepython = python3.13
allowlist_externals = uv
package_env = .pkg
setenv =
GREENWAVE_CONFIG={toxinidir}/conf/settings.py.example
[testenv:py3]
commands_pre =
uv sync --extra test
commands =
uv run pytest \
--cov-reset \
--cov-config=.coveragerc \
--cov=. \
--cov-report=term \
--cov-report=xml \
--cov-report=html \
--ignore=functional-tests \
{posargs}
[testenv:functional]
commands_pre =
uv sync --extra test --extra functional-test
setenv =
GREENWAVE_TEST_URL=http://localhost:8080/
WAIVERDB_TEST_URL=http://localhost:5004/
RESULTSDB_TEST_URL=http://localhost:5001/
allowlist_externals =
uv
docker/healthcheck.sh
commands =
docker/healthcheck.sh
uv run pytest \
--cov-reset \
--cov-config=.coveragerc \
--cov=. \
--cov-report=term \
--cov-report=xml \
--cov-report=html \
{posargs}
[testenv:bandit]
commands =
uvx --with bandit \
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]
commands =
uvx --with semgrep \
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 =
uv sync --extra docs
allowlist_externals =
uv
mkdir
rm
commands=
mkdir -p _static
rm -rf _build/
uv run sphinx-build -W -b html -d {envtmpdir}/doctrees . _build/html
[testenv:mypy]
commands_pre =
uv sync
uv pip install mypy pip
commands =
uv run mypy -p greenwave --install-types --non-interactive --ignore-missing-imports