Skip to content

Commit d28493a

Browse files
committed
Add pip-audit to CI.
1 parent 089ce50 commit d28493a

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

noxfile.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,21 @@ def _session(fn):
2323
@session(python=["3.8", "3.9", "3.10", "3.11", "pypy3"])
2424
def tests(session):
2525
session.install("-r", ROOT / "test-requirements.txt")
26-
if session.posargs == ["coverage"]:
26+
27+
if session.posargs and session.posargs[0] in {"coverage", "ghcoverage"}:
2728
session.install("coverage[toml]")
28-
session.run("coverage", "run", "-m", "pytest")
29+
session.run("coverage", "run", "-m", "pytest", REFERENCING)
2930
session.run("coverage", "report")
3031
else:
3132
session.run("pytest", *session.posargs, REFERENCING)
3233

3334

35+
@session()
36+
def audit(session):
37+
session.install("pip-audit", ROOT)
38+
session.run("python", "-m", "pip_audit")
39+
40+
3441
@session(tags=["build"])
3542
def build(session):
3643
session.install("build")

0 commit comments

Comments
 (0)