forked from useblocks/sphinx-test-reports
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnoxfile.py
More file actions
27 lines (20 loc) · 844 Bytes
/
noxfile.py
File metadata and controls
27 lines (20 loc) · 844 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
import nox
from nox import session
PYTHON_VERSIONS = ["3.10", "3.12"]
SPHINX_VERSIONS = ["5.0", "7.2.5", "8.1.3"]
SPHINX_NEEDS_VERSIONS = ["2.1", "4.2", "5.1", "6.0.0", "6.3.0"]
def run_tests(session, sphinx, sphinx_needs):
session.install(".[test]")
session.run("pip", "install", f"sphinx=={sphinx}", silent=True)
session.run("pip", "install", f"sphinx_needs=={sphinx_needs}", silent=True)
session.run("make", "test", external=True)
@session(python=PYTHON_VERSIONS)
@nox.parametrize("sphinx_needs", SPHINX_NEEDS_VERSIONS)
@nox.parametrize("sphinx", SPHINX_VERSIONS)
def tests(session, sphinx_needs, sphinx):
run_tests(session, sphinx, sphinx_needs)
@session(python="3.12")
def linkcheck(session):
session.install(".[docs]")
with session.chdir("docs"):
session.run("make", "linkcheck", external=True)