feat(CI): run linux tests with pytest-xdist (#831)

This commit is contained in:
Matthieu Darbois
2021-09-20 12:32:05 +02:00
committed by GitHub
parent 803c5e46ce
commit a85a2d7ea8
2 changed files with 15 additions and 1 deletions
+14 -1
View File
@@ -17,7 +17,20 @@ if __name__ == "__main__":
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,
)
+1
View File
@@ -11,6 +11,7 @@ extras = {
"jinja2",
"pytest>=6",
"pytest-timeout",
"pytest-xdist; sys_platform == 'linux'",
],
"bin": [
"click",