File tree Expand file tree Collapse file tree 3 files changed +71
-5
lines changed Expand file tree Collapse file tree 3 files changed +71
-5
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,9 @@ jobs:
155
155
needs : [test]
156
156
steps :
157
157
- uses : actions/checkout@v4
158
+ with :
159
+ # needed for diff-cover
160
+ fetch-depth : 0
158
161
159
162
- name : get coverage files
160
163
uses : actions/download-artifact@v4
@@ -166,7 +169,7 @@ jobs:
166
169
with :
167
170
enable-cache : true
168
171
169
- - run : uv sync --frozen --package pydantic-ai-slim
172
+ - run : uv sync --frozen --package pydantic-ai-slim --only-dev
170
173
- run : uv run --frozen coverage combine coverage
171
174
172
175
- run : uv run --frozen coverage html --show-contexts --title "PydanticAI coverage for ${{ github.sha }}"
@@ -178,7 +181,18 @@ jobs:
178
181
path : htmlcov
179
182
include-hidden-files : true
180
183
184
+ - run : uv run --frozen coverage xml
185
+
186
+ - run : uv run --frozen diff-cover coverage.xml --html-report index.html
187
+
188
+ - name : Store diff coverage html
189
+ uses : actions/upload-artifact@v4
190
+ with :
191
+ name : diff-coverage-html
192
+ path : index.html
193
+
181
194
- run : uv run --frozen coverage report --fail-under 95
195
+ - run : uv run --frozen diff-cover coverage.xml --fail-under 95
182
196
183
197
# https://github.com/marketplace/actions/alls-green#why used for branch protection checks
184
198
check :
Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ dev = [
60
60
" pytest-examples>=0.0.14" ,
61
61
" pytest-mock>=3.14.0" ,
62
62
" pytest-pretty>=1.2.0" ,
63
+ " diff-cover>=9.2.0" ,
63
64
]
64
65
65
66
[tool .hatch .build .targets .wheel ]
You can’t perform that action at this time.
0 commit comments