forked from python-trio/trustme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnoxfile.py
32 lines (27 loc) · 842 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
import os
import nox
@nox.session()
def lint(session: nox.Session) -> None:
session.install("-r", "lint-requirements.txt")
LINT_PATHS = ("src/trustme", "tests", "noxfile.py")
session.run("black", *LINT_PATHS)
session.run("isort", "--profile", "black", *LINT_PATHS)
session.run("mypy", *LINT_PATHS)
@nox.session(python=["3.9", "3.10", "3.11", "3.12", "3.13", "pypy3.10"])
def test(session: nox.Session) -> None:
session.install(".", "-r", "test-requirements.txt")
session.run(
"coverage",
"run",
"--parallel-mode",
"-m",
"pytest",
"-W",
"error",
"-ra",
"-s",
*(session.posargs or ("tests/",)),
)
if os.environ.get("CI") != "true":
session.run("coverage", "combine")
session.run("coverage", "report", "-m")