diff --git a/noxfile.py b/noxfile.py index c7c0648c..f0bc0e5b 100644 --- a/noxfile.py +++ b/noxfile.py @@ -3,17 +3,20 @@ import nox os.environ.update({"PDM_IGNORE_SAVED_PYTHON": "1"}) +nox.options.reuse_existing_virtualenvs = 1 @nox.session def validate_code(session): - session.run_always("pdm", "install", "-G", "dev", "--no-self", external=True) + session.run_always( + "pdm", "sync", "--clean", "-G", "dev", "--no-self", external=True + ) session.run("pdm", "validate_code", external=True) @nox.session def test_without_fft_and_pythran(session): - command = "pdm install -G dev -G test -G mpi --no-self" + command = "pdm sync --clean -G dev -G test -G mpi --no-self" session.run_always(*command.split(), external=True) session.install( ".", "--config-settings=setup-args=-Dtransonic-backend=python", "--no-deps" @@ -31,7 +34,7 @@ def test_with_fft_and_pythran(session): # first install fluidfft without Pythran compilation session.install("fluidfft", env={"FLUIDFFT_TRANSONIC_BACKEND": "python"}) - command = "pdm install -G dev -G test -G fft -G mpi --no-self" + command = "pdm sync --clean -G dev -G test -G fft -G mpi --no-self" session.run_always(*command.split(), external=True) session.install(".", "--no-deps", "-C", "setup-args=-Dnative=true")