-
Notifications
You must be signed in to change notification settings - Fork 10
/
noxfile.py
46 lines (36 loc) · 1.18 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
46
from nox import session
@session(python=["3.7", "3.8", "3.9", "3.10"], reuse_venv=True)
def test(session):
session.install(".")
session.install("-r", "requirements-test.txt")
if session.posargs:
session.run("pytest", *session.posargs)
else:
session.run("pytest", "tests/test_configuration.py")
@session(python=["3.7"], reuse_venv=True)
def lint(session):
session.install(".")
session.install("-r", "requirements-test.txt")
session.install("-r", "requirements-lint.txt")
session.run("black", "src")
session.run("isort", "--recursive", "src")
session.run("pylint", "src")
@session(python=["3.7"], reuse_venv=True)
def coverage(session):
session.install(".")
session.install("-r", "requirements-test.txt")
session.install("-r", "requirements-coverage.txt")
session.run(
"pytest",
"--cov",
"src/opentelemetry/launcher",
"--cov-report",
"xml",
"-k",
"TestConfiguration",
)
@session(python=["3.9"], reuse_venv=True)
def example(session):
session.install(".")
session.install("-r", "requirements-test.txt")
session.run("pytest", "tests/test_example.py", "-s")