Skip to content

Commit f392a26

Browse files
Limiting number of pytest workers to 8: avoid crashing deploynode (#2533)
* limiting number of pytest workers to 4 * Revert "limiting number of pytest workers to 4" This reverts commit fddb96c. * testing gh workflow on slurm-runner instead of deploy node * Revert "testing gh workflow on slurm-runner instead of deploy node" This reverts commit 164a98b. * use environment var to detect self-hosted: limit cores
1 parent fcdac23 commit f392a26

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/conftest.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ def pytest_xdist_auto_num_workers(config):
7272
cores = min(cores, mem_limited_cores)
7373

7474
if os.getenv("GITHUB_ACTIONS"):
75+
if os.getenv("RUNNER_ENVIRONMENT") == "self-hosted":
76+
MAX_SELF_HOSTED_CORES = 8
77+
return min(MAX_SELF_HOSTED_CORES, cores)
7578
return cores
7679
return max(1, cores - 1)
7780

0 commit comments

Comments
 (0)