-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathnoxfile.py
More file actions
63 lines (43 loc) · 1.11 KB
/
noxfile.py
File metadata and controls
63 lines (43 loc) · 1.11 KB
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
import nox
def install_reqs(session):
session.install(
'--progress-bar', 'off',
'--no-cache-dir',
'-r', 'requirements.txt')
session.install(
'--progress-bar', 'off',
'--no-cache-dir',
'-r', 'dev-requirements.txt')
def run_lint(session):
session.run('flake8', 'slp')
session.run('flake8', 'examples')
session.run('flake8', 'tests')
def run_typecheck(session):
session.run(
'python', '-m', 'mypy',
'--config-file', 'mypy.ini',
'-p', 'slp')
def run_tests(session):
session.run('pytest', '-s', '--cov', 'slp', 'tests')
@nox.session
def lint(session):
session.install('flake8')
run_lint(session)
@nox.session
def typecheck(session):
install_reqs(session)
run_typecheck(session)
@nox.session
def tests(session):
install_reqs(session)
session.install('.')
run_tests(session)
@nox.session(python=False)
def lintci(session):
run_lint(session)
@nox.session(python=False)
def typecheckci(session):
run_typecheck(session)
@nox.session(python=False)
def testsci(session):
run_tests(session)