forked from openvinotoolkit/datumaro
-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
104 lines (87 loc) · 2.64 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
[tox]
isolated_build = true
skip_missing_interpreters = true
[testenv]
passenv =
USERNAME
LOCALAPPDATA
setenv =
MPLBACKEND=agg
deps =
-r{toxinidir}/tests/requirements.txt
extras =
default
tf
tfds
torch
[testenv:pre-commit]
basepython = python3
deps =
pre-commit
commands = pre-commit run --show-diff-on-failure --color=always --all-files
[testenv:build-docs]
deps =
-r{toxinidir}/docs/requirements.txt
use_develop = true
change_dir = {toxinidir}/docs
allowlist_externals =
make
commands =
make clean
make html
[testenv:bandit-scan]
deps =
bandit
commands =
bandit -r -c .ci/ipas_default.config {toxinidir}/ -f txt -o {toxworkdir}/bandit-report.txt
[testenv:trivy-scan]
passenv = TRIVY_DOWNLOAD_URL
deps =
allowlist_externals =
bash
curl
tar
rm
*trivy*
cat
commands =
bash -c "pip freeze > {toxworkdir}/requirements.txt"
cat {toxworkdir}/requirements.txt
curl -L0 {env:TRIVY_DOWNLOAD_URL} -o {toxworkdir}/trivy.tar.gz
tar -xzf {toxworkdir}/trivy.tar.gz -C {toxworkdir}
{toxworkdir}/trivy fs -d -c .ci/trivy.yaml --dependency-tree -o {toxworkdir}/trivy-results-datumaro.txt {toxworkdir}/requirements.txt
{toxworkdir}/trivy fs -d -c .ci/trivy.yaml --list-all-pkgs --format template --template "@.ci/trivy-csv.tmpl" -o {toxworkdir}/trivy-results-datumaro.csv {toxworkdir}/requirements.txt
{toxworkdir}/trivy fs -d -c .ci/trivy.yaml --format spdx-json -o {toxworkdir}/trivy-spdx-datumaro.json {toxworkdir}/requirements.txt
cat {toxworkdir}/trivy-results-datumaro.txt
rm {toxworkdir}/trivy.tar.gz
rm {toxworkdir}/trivy
rm {toxworkdir}/requirements.txt
[testenv:tests-py{39,310,311}-{lin,win}]
commands =
python -m pytest -v --csv={toxworkdir}/results-{envname}.csv {posargs:tests}
[testenv:validation]
commands =
python -m pytest -v --csv={toxworkdir}/results_val_{envname}.csv -m {posargs:new}
[testenv:stability-{lin,win}]
deps =
{[testenv]deps}
pytest-loop
allowlist_externals =
bash
commands_pre =
bash -c 'cargo -V; echo "cargo (rust) version checking exit code = $?"'
python -m pip uninstall pytest-stress -y
commands =
python -m pytest -v --csv={toxworkdir}/results-{envname}.csv -x {posargs:--loop 5}
[testenv:fuzzing]
deps=
{[testenv]deps}
atheris
allowlist_externals =
bash
commands_pre =
bash -c 'cargo -V; echo "cargo (rust) version checking exit code = $?"'
commands =
coverage erase
- coverage run tests/fuzzing/cli_fuzzing.py {posargs:-dict=tests/fuzzing/assets/cli_operations.dict -artifact_prefix={toxworkdir}/ -print_final_stats=1 -atheris_runs=500000}
coverage report --precision=2