forked from picoCTF/picoCTF
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
67 lines (59 loc) · 1.44 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
[tox]
# don't perform package operation and install it to virtual env
skipsdist=True
envlist = py37, web-unittest, flake8, bandit
[testenv]
description = run tests for picoCTF-shell
passenv = TOXENV CI TRAVIS TRAVIS_* CODECOV_*
basepython = python3
changedir = picoCTF-shell
deps =
pytest
pytest-cov
codecov>=1.4.0
-rpicoCTF-shell/requirements.txt
commands =
pytest --cov=hacksport/ --cov-branch --cov=shell_manager/
codecov -e TOXENV
[testenv:web-unittest]
description = run unit tests for picoCTF-web
passenv = TOXENV CI TRAVIS TRAVIS_* CODECOV_*
basepython = python3
changedir = picoCTF-web
deps =
pytest
pytest-cov
pytest-mongo
pytest-redis
codecov>=1.4.0
commands =
pip install .
pytest --cov api/ --cov-branch
codecov -e TOXENV
[testenv:flake8]
description = run flake8 with isort to check code and docstring style
basepython = python3
changedir = {toxinidir}
deps =
flake8
flake8-isort
darglint
commands =
flake8 picoCTF-web/ picoCTF-shell/
[testenv:bandit]
description = run bandit security linter for picoCTF with {basepython}
basepython = python3
changedir = {toxinidir}
deps =
bandit
commands =
bandit --recursive picoCTF-shell/ picoCTF-web/ --exclude picoCTF-shell/tests/,picoCTF-web/test/
# Flake8 Configuration
[flake8]
exclude =
__pycache__,
picoCTF-web/tests/*,
picoCTF-shell/tests/*,
max-line-length = 88
select = C,E,F,W,B,B950
ignore = E203, E266, E501, W503