-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathnoxfile.py
More file actions
48 lines (42 loc) · 1.01 KB
/
noxfile.py
File metadata and controls
48 lines (42 loc) · 1.01 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
from pathlib import Path
import nox
from nox.sessions import Session
HERE = Path(__file__).parent
@nox.session(
python=(
"python3.10",
"python3.11",
"python3.12",
"python3.13",
"pypy3.10",
"python-3.14",
),
venv_backend=None,
)
def tests(session: Session):
print(f"🪄 Creating poetry environment for {session.python}")
session.run("poetry", "env", "use", session.python, external=True)
print("📦 Install dependencies...")
session.run("poetry", "install", "--with=dev", external=True)
print("▶️ Run tests")
session.run(
"poetry",
"run",
"coverage",
"run",
"--rcfile=.coveragerc",
"-m",
"pytest",
"--no-cov",
"--config-file=pytest.ini",
external=True,
)
session.run(
"poetry",
"run",
"coverage",
"xml",
"--rcfile=.coveragerc",
f"-oreports/coverage-{session.python}.xml",
external=True,
)