Skip to content

Commit

Permalink
pybamm-team#3443 Add Windows support via nox
Browse files Browse the repository at this point in the history
  • Loading branch information
agriyakhetarpal committed Nov 22, 2023
1 parent e17163f commit 05d1061
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ def run_coverage(session):
"""Run the coverage tests and generate an XML report."""
set_environment_variables(PYBAMM_ENV, session=session)
session.install("coverage", silent=False)
session.install("-e", ".[all]", silent=False)
session.install("-e", ".[all,jax]", silent=False)
if sys.platform != "win32":
session.install("-e", ".[odes,jax]", silent=False)
session.install("-e", ".[odes]", silent=False)
session.run("coverage", "run", "--rcfile=.coveragerc", "run-tests.py", "--nosub")
session.run("coverage", "combine")
session.run("coverage", "xml")
Expand All @@ -89,9 +89,9 @@ def run_doctests(session):
def run_unit(session):
"""Run the unit tests."""
set_environment_variables(PYBAMM_ENV, session=session)
session.install("-e", ".[all]", silent=False)
session.install("-e", ".[all,jax]", silent=False)
if sys.platform == "linux":
session.install("-e", ".[odes,jax]", silent=False)
session.install("-e", ".[odes]", silent=False)
session.run("python", "run-tests.py", "--unit")


Expand Down Expand Up @@ -128,16 +128,16 @@ def set_dev(session):
external=True,
)
else:
session.run(python, "-m", "pip", "install", "-e", ".[all,dev]", external=True)
session.run(python, "-m", "pip", "install", "-e", ".[all,dev,jax]", external=True)


@nox.session(name="tests")
def run_tests(session):
"""Run the unit tests and integration tests sequentially."""
set_environment_variables(PYBAMM_ENV, session=session)
session.install("-e", ".[all]", silent=False)
session.install("-e", ".[all,jax]", silent=False)
if sys.platform == "linux" or sys.platform == "darwin":
session.install("-e", ".[odes, jax]", silent=False)
session.install("-e", ".[odes]", silent=False)
session.run("python", "run-tests.py", "--all")


Expand Down

0 comments on commit 05d1061

Please sign in to comment.