forked from release-engineering/greenwave
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtox.ini
More file actions
97 lines (89 loc) · 2.08 KB
/
tox.ini
File metadata and controls
97 lines (89 loc) · 2.08 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
86
87
88
89
90
91
92
93
94
95
96
97
[tox]
envlist = bandit,lint,mypy,semgrep,py3,docs
isolated_build = True
[testenv]
extras =
test
setenv =
GREENWAVE_CONFIG={toxinidir}/conf/settings.py.example
commands =
pytest \
--cov-reset \
--cov-config=.coveragerc \
--cov=greenwave \
--cov-report=term \
--cov-report=xml \
--cov-report=html \
--ignore=functional-tests \
{posargs}
[testenv:functional]
extras =
test
functional-test
setenv =
GREENWAVE_TEST_URL=http://localhost:8080/
WAIVERDB_TEST_URL=http://localhost:5004/
RESULTSDB_TEST_URL=http://localhost:5001/
allowlist_externals = docker/healthcheck.sh
commands =
docker/healthcheck.sh
pytest \
--cov-reset \
--cov-config=.coveragerc \
--cov=greenwave \
--cov-report=term \
--cov-report=xml \
--cov-report=html \
{posargs}
[testenv:bandit]
skip_install = true
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]
skip_install = true
deps =
semgrep
commands =
semgrep scan --config=auto --error \
--exclude=docker-compose.yml \
--exclude=".*" \
{posargs}
[testenv:docs]
# Same Python version as in .readthedocs.yaml
basepython = python3.11
changedir = docs
extras =
docs
allowlist_externals =
mkdir
rm
commands=
mkdir -p _static
rm -rf _build/
sphinx-build -W -b html -d {envtmpdir}/doctrees . _build/html
[testenv:lint]
deps =
flake8 > 3.0
commands =
python -m flake8 {posargs}
[testenv:mypy]
skip_install = true
deps =
mypy
commands =
mypy -p greenwave --install-types --non-interactive --ignore-missing-imports
[flake8]
show-source = True
max-line-length = 100
exclude = .git,.tox,dist,*egg,docs,.env,.venv,docker
# E265 block comment should start with '# '
# W503 line break before binary operator
# W504 line break after binary operator
ignore = E265,W503,W504