forked from center-for-threat-informed-defense/tram
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
51 lines (42 loc) · 1.01 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
[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')"
python -c "import nltk; nltk.download('omw-1.4')"
pytest --cov=tram --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
extend-ignore = E203
exclude =
src/archive
src/tram/migrations
[pytest]
DJANGO_SETTINGS_MODULE = tram.settings
testpaths =
tests
[gh-actions]
python =
3.9: tram, bandit, flake8, safety