-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnoxfile.py
More file actions
46 lines (37 loc) · 1.07 KB
/
noxfile.py
File metadata and controls
46 lines (37 loc) · 1.07 KB
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
from pathlib import Path
import nox
package_path = Path.cwd()
nox.options.default_venv_backend = 'uv'
@nox.session
def tests(session: nox.Session):
session.run('uv', 'sync', '--active', '--no-dev', '--group', 'tests')
session.run(
'pytest',
'-ra',
'--tb=native',
'--strict-markers',
'--cov=sysdi',
'--cov-config=.coveragerc',
'--cov-report=xml',
'--no-cov-on-fail',
f'--junit-xml={package_path}/ci/test-reports/{session.name}.pytests.xml',
'src/sysdi_tests',
*session.posargs,
)
@nox.session
def precommit(session: nox.Session):
session.run('uv', 'sync', '--active', '--no-dev', '--group', 'pre-commit')
session.run(
'pre-commit',
'run',
'--all-files',
)
@nox.session
def audit(session: nox.Session):
# Much faster to install the deps first and have pip-audit run against the venv
session.run('uv', 'sync', '--active', '--no-dev', '--group', 'audit')
session.run(
'pip-audit',
'--desc',
'--skip-editable',
)