-
Notifications
You must be signed in to change notification settings - Fork 175
/
noxfile.py
48 lines (42 loc) · 1.08 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
47
48
"""Nox file for running tests against 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 test suite against Python versions 3.9, 3.10, 3.11, and 3.12."""
session.install(".")
session.install(
"pytest",
"pytest-asyncio",
"pytest-cov",
"pytest-randomly",
"pytest-sugar",
"pytest-xdist",
)
session.run(
"poetry",
"run",
"pytest",
"--cov=readmeai",
"--cov-branch",
"--cov-report=xml",
"--cov-report=term-missing",
"--cov-fail-under=80",
"--asyncio-mode=auto",
"--numprocesses=auto",
"--durations=10",
external=True,
)