-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnoxfile.py
More file actions
47 lines (41 loc) · 1.17 KB
/
noxfile.py
File metadata and controls
47 lines (41 loc) · 1.17 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
import nox
nox.options.reuse_existing_virtualenvs = True
nox.options.default_venv_backend = "uv"
@nox.session(python=["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"])
def tests(session: nox.Session) -> None:
session.run_install(
"uv",
"sync",
"--no-dev",
"--group=coverage",
"--group=test",
f"--python={session.virtualenv.location}",
env={"UV_PROJECT_ENVIRONMENT": session.virtualenv.location},
)
session.run(
"coverage",
"run",
"-m",
"pytest",
"--numprocesses=auto",
*session.posargs,
)
@nox.session(python="3.13")
def typing(session: nox.Session) -> None:
session.run_install(
"uv",
"sync",
"--no-dev",
"--group=test",
"--group=typing",
f"--python={session.virtualenv.location}",
env={"UV_PROJECT_ENVIRONMENT": session.virtualenv.location},
)
session.run(
"mypy",
"src/keyrings",
"tests",
# This environment variable is required in combination with
# explicit_package_bases in pyproject.toml so that namespace packages work.
env={"MYPYPATH": "src"},
)