forked from sparckles/Robyn
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnoxfile.py
More file actions
47 lines (39 loc) · 1.14 KB
/
noxfile.py
File metadata and controls
47 lines (39 loc) · 1.14 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
47
import sys
import nox
@nox.session(python=["3.9", "3.10", "3.11", "3.12", "3.13"])
def tests(session):
session.run("pip", "install", "poetry==1.3.0")
session.run("pip", "install", "maturin")
session.run(
"poetry",
"export",
"--with",
"test",
"--with",
"dev",
"--without-hashes",
"--output",
"requirements.txt",
)
session.run("pip", "install", "-r", "requirements.txt")
session.run("pip", "install", "-e", ".")
args = [
"maturin",
"build",
"-i",
"python",
"--out",
"dist",
]
if sys.platform == "darwin":
session.run("rustup", "target", "add", "x86_64-apple-darwin")
session.run("rustup", "target", "add", "aarch64-apple-darwin")
args.append("--target")
args.append("universal2-apple-darwin")
session.run(*args)
session.run("pip", "install", "--no-index", "--find-links=dist/", "robyn")
session.run("pytest")
@nox.session(python=["3.11"])
def lint(session):
session.run("pip", "install", "black", "ruff")
session.run("black", "robyn/", "integration_tests/")