-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnoxfile.py
38 lines (28 loc) · 936 Bytes
/
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
import nox
nox.options.sessions = ["test", "flake8", "pydocstyle"]
nox.options.reuse_existing_virtualenvs = True
PYTHON_VERSIONS = ["2.7", "3.5", "3.6", "3.7"]
@nox.session(python=PYTHON_VERSIONS)
def test(session):
"""Run tests."""
args = ["pip", "install", "codecov"]
session.run(*args)
session.install("-r", "requirements-test.txt")
args = ["coverage", "run", "setup.py", "test"]
session.run(*args)
args = ["coverage", "report"]
session.run(*args)
args = ["codecov"]
session.run(*args)
@nox.session(python=PYTHON_VERSIONS)
def flake8(session):
"""Run flake8."""
session.install("-r", "requirements-test.txt")
args = ["flake8", "laterpay", "setup.py", "tests"]
session.run(*args)
@nox.session(python=PYTHON_VERSIONS)
def pydocstyle(session):
"""Run pydocstyle."""
session.install("-r", "requirements-test.txt")
args = ["pydocstyle"]
session.run(*args)