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
22
noxfile.py
22
noxfile.py
|
|
@ -131,11 +131,9 @@ def mypy(session: nox.Session):
|
|||
# )
|
||||
|
||||
|
||||
@nox.session(python=PYTHONS)
|
||||
def tests(session: nox.Session):
|
||||
session.conda_install("pytest", "hypothesis", "lark", "maturin")
|
||||
@nox.session(python=False)
|
||||
def rust_tests(session: nox.Session) -> None:
|
||||
session.env.update(ENV)
|
||||
try:
|
||||
session.run(
|
||||
"cargo",
|
||||
"test",
|
||||
|
|
@ -145,9 +143,11 @@ def tests(session: nox.Session):
|
|||
"pyargus",
|
||||
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(
|
||||
"maturin",
|
||||
"develop",
|
||||
|
|
@ -160,8 +160,12 @@ def tests(session: nox.Session):
|
|||
)
|
||||
with session.chdir(CURRENT_DIR / "pyargus"):
|
||||
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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue