ci: separate rust and python test sessions
This commit is contained in:
parent
eab6e219ef
commit
a295f21049
1 changed files with 34 additions and 30 deletions
64
noxfile.py
64
noxfile.py
|
|
@ -131,37 +131,41 @@ def mypy(session: nox.Session):
|
||||||
# )
|
# )
|
||||||
|
|
||||||
|
|
||||||
@nox.session(python=PYTHONS)
|
@nox.session(python=False)
|
||||||
def tests(session: nox.Session):
|
def rust_tests(session: nox.Session) -> None:
|
||||||
session.conda_install("pytest", "hypothesis", "lark", "maturin")
|
|
||||||
session.env.update(ENV)
|
session.env.update(ENV)
|
||||||
try:
|
session.run(
|
||||||
session.run(
|
"cargo",
|
||||||
"cargo",
|
"test",
|
||||||
"test",
|
"--release",
|
||||||
"--release",
|
"--workspace",
|
||||||
"--workspace",
|
"--exclude",
|
||||||
"--exclude",
|
"pyargus",
|
||||||
"pyargus",
|
external=True,
|
||||||
external=True,
|
)
|
||||||
)
|
|
||||||
except Exception:
|
|
||||||
...
|
@nox.session(python=PYTHONS)
|
||||||
try:
|
def python_tests(session: nox.Session) -> None:
|
||||||
session.run(
|
session.conda_install("pytest", "hypothesis", "lark", "maturin")
|
||||||
"maturin",
|
session.run(
|
||||||
"develop",
|
"maturin",
|
||||||
"--release",
|
"develop",
|
||||||
"-m",
|
"--release",
|
||||||
"./pyargus/Cargo.toml",
|
"-m",
|
||||||
"-E",
|
"./pyargus/Cargo.toml",
|
||||||
"test",
|
"-E",
|
||||||
silent=True,
|
"test",
|
||||||
)
|
silent=True,
|
||||||
with session.chdir(CURRENT_DIR / "pyargus"):
|
)
|
||||||
session.run("pytest", ".", "--hypothesis-explain")
|
with session.chdir(CURRENT_DIR / "pyargus"):
|
||||||
except Exception:
|
session.run("pytest", ".", "--hypothesis-explain")
|
||||||
...
|
|
||||||
|
|
||||||
|
@nox.session(python=False)
|
||||||
|
def tests(session: nox.Session):
|
||||||
|
session.notify("rust_tests")
|
||||||
|
session.notify("python_tests")
|
||||||
|
|
||||||
|
|
||||||
@nox.session(python=DEFAULT_PYTHON)
|
@nox.session(python=DEFAULT_PYTHON)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue