-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathnoxfile.py
More file actions
28 lines (22 loc) · 848 Bytes
/
noxfile.py
File metadata and controls
28 lines (22 loc) · 848 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
28
import nox
import os
import glob
@nox.session()
def build(session):
session.run("pdm", "build")
@nox.session(python=['/opt/pypy3/bin/pypy3.10', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13' ])
def tests(session):
session.install("pytest")
# Find the whl packages. We're going to sort by newest to oldest
# so for testing we can install the freshest copy
package_files = sorted(
glob.glob("dist/izaber_wamp_zerp-*.whl"),
key=os.path.getmtime,
reverse=True
)
if not package_files:
raise FileNotFoundError("No izaber_wamp_zerp-VERSION.whl package found in the 'dist' directory.")
# Install the built package
session.install(package_files[0])
# Run tests
session.run("pytest", "--log-cli-level=WARN", "-s")