forked from center-for-threat-informed-defense/tram
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
50 lines (41 loc) · 1.04 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
[tox]
envlist = tram, bandit, flake8, safety
skipsdist = True
[testenv]
deps =
-r{toxinidir}/requirements/requirements.txt
-r{toxinidir}/requirements/test-requirements.txt
passenv = GITHUB_*
[testenv:tram]
description = Run Pytest
commands =
python -c "import nltk; nltk.download('punkt')"
python -c "import nltk; nltk.download('wordnet')"
pytest --cov=src/ --cov=src/tram --cov=src/tram/tram/ml --cov=src/tram/tram/management/commands --cov-report=xml
[testenv:bandit]
description = Bandit Security Checks
commands =
bandit -r src/ -ll -ii
[testenv:flake8]
description = Flake8 Code Style Checks
commands =
flake8 src/ tests/
[testenv:safety]
description = Safety Vulnerability Checks
commands =
safety check --file requirements/requirements.txt
[flake8]
max-line-length = 120
indent-size = 4
max-complexity = 20
exclude =
src/archive
src/tram/tram/migrations
[pytest]
DJANGO_SETTINGS_MODULE = tram.settings
python_paths = src/tram
testpaths =
tests
[gh-actions]
python =
3.9: tram, bandit, flake8, safety