Skip to content

Commit

Permalink
feat(CI): run linux tests with pytest-xdist
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeut committed Sep 19, 2021
1 parent 2ab5eed commit 2b94805
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
15 changes: 14 additions & 1 deletion bin/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"jinja2",
"pytest>=6",
"pytest-timeout",
"pytest-xdist; sys_platform == 'linux'",
],
"bin": [
"click",
Expand Down

0 comments on commit 2b94805

Please sign in to comment.