-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathnoxfile.py
More file actions
41 lines (34 loc) · 983 Bytes
/
noxfile.py
File metadata and controls
41 lines (34 loc) · 983 Bytes
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
from __future__ import annotations
import nox
@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "pypy"])
def test(session: nox.Session) -> None:
# Install deps and the package itself.
session.install("-r", "requirements-dev.txt")
session.install(".", silent=False)
# Show the pip version.
session.run("pip", "--version")
session.run("python", "--version")
session.run(
"python",
"-m",
"coverage",
"run",
"--parallel-mode",
"-m",
"pytest",
"-v",
"-ra",
"--color=yes",
"--tb=native",
"--durations=10",
"--strict-config",
"--strict-markers",
*(session.posargs or ("tests/",)),
env={
"PYTHONWARNINGS": "always::DeprecationWarning",
},
)
@nox.session
def lint(session: nox.Session) -> None:
session.install("pre-commit")
session.run("pre-commit", "run", "--all-files")