Skip to content

Commit 6d7d94c

Browse files
committed
ci: better parallel
Signed-off-by: Henry Schreiner <[email protected]>
1 parent d633518 commit 6d7d94c

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

azure-pipelines.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pr:
77
jobs:
88
- job: linux_311
99
timeoutInMinutes: 120
10-
pool: {vmImage: 'Ubuntu-20.04'}
10+
pool: {vmImage: 'Ubuntu-22.04'}
1111
steps:
1212
- task: UsePythonVersion@0
1313
inputs:
@@ -27,7 +27,7 @@ jobs:
2727
- bash: |
2828
python -m pip install dependency-groups
2929
python -m dependency_groups test | xargs python -m pip install -e.
30-
python ./bin/run_tests.py --num-processes 2
30+
python ./bin/run_tests.py
3131
3232
- job: windows_311
3333
pool: {vmImage: 'windows-2019'}

bin/run_tests.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88
from pathlib import Path
99

1010
if __name__ == "__main__":
11-
default_cpu_count = os.cpu_count() or 2
11+
if sys.version_info < (3, 13):
12+
default_cpu_count = os.cpu_count() or 2
13+
else:
14+
default_cpu_count = os.process_cpu_count() or 2
15+
1216
parser = argparse.ArgumentParser()
1317
parser.add_argument(
1418
"--run-podman", action="store_true", default=False, help="run podman tests (linux only)"

0 commit comments

Comments
 (0)