-
Notifications
You must be signed in to change notification settings - Fork 11
/
noxfile.py
46 lines (36 loc) · 1.21 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
import nox
nox.options.reuse_existing_virtualenvs = True
@nox.session
def changelog(session):
"""Run github activity on this repository with the current repo."""
session.install("-r", "requirements.txt")
session.install("-e", ".")
# Run github activity and re-use the posargs
cmd = ["github-activity"] + session.posargs + ["-o", "tmp.md"]
session.run(*cmd)
@nox.session
def docs(session):
"""Run github activity on this repository with the current repo."""
session.install("-e", ".")
session.install("-r", "docs/requirements.txt")
if "live" in session.posargs:
session.install("sphinx-autobuild")
session.run(
"sphinx-autobuild",
"-b",
"dirhtml",
"--port",
"0",
"docs",
"docs/_build/dirhtml",
)
else:
session.run("sphinx-build", "-b", "dirhtml", "docs", "docs/_build/dirhtml")
@nox.session
def test(session):
"""Run github activity on this repository with the current repo."""
session.install("-r", "requirements.txt")
session.install("-e", ".")
# Run github activity and re-use the posargs
cmd = ["pytest"] + session.posargs
session.run(*cmd)