-
Notifications
You must be signed in to change notification settings - Fork 125
/
noxfile.py
39 lines (33 loc) 路 833 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
39
"""
Nox file for running tests across multiple Python versions.
"""
import nox
def install(session, groups, root=True):
"""Install the package in the current session."""
if root:
groups = ["main", *groups]
session.run_always(
"poetry",
"install",
"--no-root",
"--sync",
f"--only={','.join(groups)}",
external=True,
)
if root:
session.install(".")
@nox.session(python=["3.9", "3.10", "3.11", "3.12"])
def tests(session):
"""Run the test suite across Python versions"""
session.install(".")
session.install(".[test]")
session.run(
"pytest",
"-vv",
"-n auto",
"--asyncio-mode=auto",
"--cov=./",
"--cov-branch",
"--cov-report=xml",
"--cov-report=term-missing",
)