forked from mozilla/sphinx-js
-
Notifications
You must be signed in to change notification settings - Fork 5
/
noxfile.py
48 lines (41 loc) · 1.49 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
from pathlib import Path
import nox
from nox.sessions import Session
@nox.session(python=["3.10", "3.11", "3.12", "3.13"])
def tests(session: Session) -> None:
session.install("-r", "requirements_dev.txt")
venvroot = Path(session.bin).parent
(venvroot / "node_modules").mkdir()
with session.chdir(venvroot):
session.run(
"npm", "i", "--no-save", "[email protected]", "[email protected]", external=True
)
session.run(
"pytest",
"--junitxml=test-results.xml",
"--cov=sphinx_js",
"--cov-report",
"xml",
)
@nox.session(python=["3.12"])
@nox.parametrize("typedoc", ["0.25"])
def test_typedoc(session: Session, typedoc: str) -> None:
session.install("-r", "requirements_dev.txt")
venvroot = Path(session.bin).parent
(venvroot / "node_modules").mkdir()
with session.chdir(venvroot):
session.run(
"npm", "i", "--no-save", "[email protected]", f"typedoc@{typedoc}", external=True
)
session.run("pytest", "--junitxml=test-results.xml", "-k", "not js")
@nox.session(python=["3.12"])
def test_sphinx_6(session: Session) -> None:
session.install("sphinx<7")
session.install("-r", "requirements_dev.txt")
venvroot = Path(session.bin).parent
(venvroot / "node_modules").mkdir()
with session.chdir(venvroot):
session.run(
"npm", "i", "--no-save", "[email protected]", "[email protected]", external=True
)
session.run("pytest", "--junitxml=test-results.xml", "-k", "not js")