@@ -140,6 +140,7 @@ jobs:
140140 env :
141141 UV_PYTHON : ${{ matrix.python-version }}
142142 CI : true
143+ COVERAGE_PROCESS_START : ./pyproject.toml
143144 steps :
144145 - uses : actions/checkout@v4
145146
@@ -151,20 +152,20 @@ jobs:
151152 with :
152153 deno-version : v2.x
153154
154- - run : mkdir coverage
155+ - run : mkdir . coverage
155156
156157 # run tests with just `pydantic-ai-slim` dependencies
157- - run : uv run --package pydantic-ai-slim coverage run -m pytest
158+ - run : uv run --package pydantic-ai-slim coverage run -m pytest -n auto --dist=loadgroup
158159 env :
159- COVERAGE_FILE : coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}-slim
160+ COVERAGE_FILE : . coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}-slim
160161
161- - run : uv run coverage run -m pytest
162+ - run : uv run coverage run -m pytest -n auto --dist=loadgroup
162163 env :
163- COVERAGE_FILE : coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}-standard
164+ COVERAGE_FILE : . coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}-standard
164165
165- - run : uv run --all-extras coverage run -m pytest
166+ - run : uv run --all-extras coverage run -m pytest -n auto --dist=loadgroup
166167 env :
167- COVERAGE_FILE : coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}-all-extras
168+ COVERAGE_FILE : . coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}-all-extras
168169
169170 - run : uv run --all-extras python tests/import_examples.py
170171
@@ -173,15 +174,15 @@ jobs:
173174 if : matrix.python-version != '3.9'
174175 run : |
175176 unset UV_FROZEN
176- uv run --all-extras --resolution lowest-direct coverage run -m pytest
177+ uv run --all-extras --resolution lowest-direct coverage run -m pytest -n auto --dist=loadgroup
177178 env :
178- COVERAGE_FILE : coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}-lowest-versions
179+ COVERAGE_FILE : . coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}-lowest-versions
179180
180181 - name : store coverage files
181182 uses : actions/upload-artifact@v4
182183 with :
183184 name : coverage-${{ matrix.python-version }}
184- path : coverage
185+ path : . coverage
185186 include-hidden-files : true
186187
187188 coverage :
@@ -197,15 +198,15 @@ jobs:
197198 uses : actions/download-artifact@v4
198199 with :
199200 merge-multiple : true
200- path : coverage
201+ path : . coverage
201202
202203 - uses : astral-sh/setup-uv@v5
203204 with :
204205 enable-cache : true
205206
206207 - run : uv sync --package pydantic-ai-slim --only-dev
207- - run : rm coverage/.coverage.*-py3.9-* # Exclude 3.9 coverage as it gets the wrong line numbers, causing invalid failures.
208- - run : uv run coverage combine coverage
208+ - run : rm . coverage/.coverage.*-py3.9-* # Exclude 3.9 coverage as it gets the wrong line numbers, causing invalid failures.
209+ - run : uv run coverage combine
209210
210211 - run : uv run coverage html --show-contexts --title "Pydantic AI coverage for ${{ github.sha }}"
211212
@@ -228,7 +229,10 @@ jobs:
228229
229230 - run : uv run coverage report --fail-under 100
230231 - run : uv run diff-cover coverage.xml --fail-under 100
232+
231233 - run : uv run strict-no-cover
234+ env :
235+ COVERAGE_FILE : .coverage/.coverage
232236
233237 test-mcp-run-python :
234238 runs-on : ubuntu-latest
0 commit comments