Skip to content

Commit 2535c0b

Browse files
authored
fix coverage badge (#2652)
1 parent f5f7b80 commit 2535c0b

File tree

2 files changed

+20
-14
lines changed

2 files changed

+20
-14
lines changed

.github/workflows/after-ci.yml

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ jobs:
1717
- uses: astral-sh/setup-uv@v5
1818
with:
1919
enable-cache: true
20-
python-version: '3.12'
20+
python-version: "3.12"
2121

2222
- uses: dawidd6/action-download-artifact@v6
2323
with:
2424
workflow: ci.yml
25-
name: '(diff-)?coverage-html.*'
25+
name: "(diff-)?coverage-html.*"
2626
name_is_regexp: true
2727
commit: ${{ github.event.workflow_run.head_sha }}
2828
allow_forks: true
@@ -39,16 +39,6 @@ jobs:
3939
SMOKESHOW_GITHUB_PR_HEAD_SHA: ${{ github.event.workflow_run.head_sha }}
4040
SMOKESHOW_AUTH_KEY: ${{ secrets.SMOKESHOW_AUTH_KEY }}
4141

42-
- run: uvx smokeshow upload diff-coverage-html
43-
if: hashFiles('diff-coverage-html/*.html') != ''
44-
env:
45-
SMOKESHOW_GITHUB_STATUS_DESCRIPTION: Diff coverage {coverage-percentage}
46-
SMOKESHOW_GITHUB_COVERAGE_THRESHOLD: 95
47-
SMOKESHOW_GITHUB_CONTEXT: diff-coverage
48-
SMOKESHOW_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49-
SMOKESHOW_GITHUB_PR_HEAD_SHA: ${{ github.event.workflow_run.head_sha }}
50-
SMOKESHOW_AUTH_KEY: ${{ secrets.SMOKESHOW_AUTH_KEY }}
51-
5242
deploy-docs-preview:
5343
runs-on: ubuntu-latest
5444
if: github.event.workflow_run.event == 'pull_request'
@@ -65,7 +55,7 @@ jobs:
6555
- uses: astral-sh/setup-uv@v5
6656
with:
6757
enable-cache: true
68-
python-version: '3.12'
58+
python-version: "3.12"
6959

7060
- uses: dawidd6/action-download-artifact@v6
7161
with:

.github/workflows/ci.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,13 @@ jobs:
266266
env:
267267
COVERAGE_FILE: .coverage/.coverage
268268

269+
- run: uv run coverage html --show-contexts --title "Pydantic AI coverage for ${{ github.sha }}"
270+
- uses: actions/upload-artifact@v4
271+
with:
272+
name: coverage-html
273+
path: htmlcov
274+
include-hidden-files: true
275+
269276
test-mcp-run-python:
270277
runs-on: ubuntu-latest
271278
timeout-minutes: 5
@@ -292,7 +299,16 @@ jobs:
292299
# https://github.com/marketplace/actions/alls-green#why used for branch protection checks
293300
check:
294301
if: always()
295-
needs: [lint, mypy, docs, test-live, test, test-lowest-versions, test-examples, coverage, test-mcp-run-python]
302+
needs:
303+
- lint
304+
- mypy
305+
- docs
306+
- test-live
307+
- test
308+
- test-lowest-versions
309+
- test-examples
310+
- coverage
311+
- test-mcp-run-python
296312
runs-on: ubuntu-latest
297313

298314
steps:

0 commit comments

Comments
 (0)