-
Notifications
You must be signed in to change notification settings - Fork 2
/
noxfile.py
45 lines (32 loc) · 1.06 KB
/
noxfile.py
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
import os
import nox
@nox.session(python=["3.8"])
def flake8(session):
session.install("flake8", "flake8-bugbear", "flake8-import-order", "flake8-bandit")
session.run("flake8", "mango")
@nox.session(python=["3.8"])
def pylint(session):
session.install("pylint")
session.run("pylint", "mango")
@nox.session(python=["3.8"])
def pytype(session):
session.install("pytype")
session.run("pytype", "-d import-error", "mango")
@nox.session(python=["3.8"])
def safety(session):
session.install("safety")
session.run("safety", "check")
@nox.session(python=["3.8"])
def unit_tests(session):
session.install("-r", "requirements.txt")
session.install("-e", ".")
session.install("pytest", "pytest-cov")
os.chdir("tests/unit_tests")
session.run("pytest", "--cov", ".")
@nox.session(python=["3.8"])
def integration_tests(session):
session.install("-r", "requirements.txt")
session.install("-e", ".")
session.install("pytest", "pytest-cov")
os.chdir("tests/integration_tests")
session.run("pytest", "--cov", ".")