chore(ci): speed-up tests (#1752)

* chore(ci): speed-up tests

* back to 2 processes on Azure macOS
This commit is contained in:
Matthieu Darbois
2024-02-29 16:27:09 -05:00
committed by GitHub
parent 1fe6b1aa44
commit ae2451a199
5 changed files with 20 additions and 13 deletions
+8 -1
View File
@@ -9,10 +9,17 @@ import sys
from pathlib import Path
if __name__ == "__main__":
default_cpu_count = os.cpu_count() or 2
parser = argparse.ArgumentParser()
parser.add_argument(
"--run-podman", action="store_true", default=False, help="run podman tests (linux only)"
)
parser.add_argument(
"--num-processes",
action="store",
default=default_cpu_count,
help="number of processes to use for testing",
)
args = parser.parse_args()
# move cwd to the project root
@@ -35,7 +42,7 @@ if __name__ == "__main__":
sys.executable,
"-m",
"pytest",
"--numprocesses=2",
f"--numprocesses={args.num_processes}",
"-x",
"--durations",
"0",