diff --git a/bin/run_tests.py b/bin/run_tests.py index 50550a881..4b56acf00 100755 --- a/bin/run_tests.py +++ b/bin/run_tests.py @@ -17,7 +17,20 @@ subprocess.run(unit_test_args, check=True) # run the integration tests + xdist_test_args = [] + if sys.platform.startswith("linux"): + xdist_test_args = ["-n", "2"] subprocess.run( - [sys.executable, "-m", "pytest", "-x", "--durations", "0", "--timeout=2400", "test"], + [ + sys.executable, + "-m", + "pytest", + *xdist_test_args, + "-x", + "--durations", + "0", + "--timeout=2400", + "test", + ], check=True, ) diff --git a/setup.py b/setup.py index bcd7324bd..292489bf3 100644 --- a/setup.py +++ b/setup.py @@ -11,6 +11,7 @@ "jinja2", "pytest>=6", "pytest-timeout", + "pytest-xdist; sys_platform == 'linux'", ], "bin": [ "click",