ci: separate rust and python test sessions

This commit is contained in:
Anand Balakrishnan 2023-10-18 16:38:06 -07:00
parent eab6e219ef
commit a295f21049
No known key found for this signature in database

View file

@ -131,11 +131,9 @@ 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",
@ -145,9 +143,11 @@ def tests(session: nox.Session):
"pyargus", "pyargus",
external=True, external=True,
) )
except Exception:
...
try: @nox.session(python=PYTHONS)
def python_tests(session: nox.Session) -> None:
session.conda_install("pytest", "hypothesis", "lark", "maturin")
session.run( session.run(
"maturin", "maturin",
"develop", "develop",
@ -160,8 +160,12 @@ def tests(session: nox.Session):
) )
with session.chdir(CURRENT_DIR / "pyargus"): with session.chdir(CURRENT_DIR / "pyargus"):
session.run("pytest", ".", "--hypothesis-explain") session.run("pytest", ".", "--hypothesis-explain")
except Exception:
...
@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)