Skip to content

Commit c7eed1b

Browse files
committed
ci
1 parent 1b7023c commit c7eed1b

2 files changed

Lines changed: 16 additions & 7 deletions

File tree

.github/workflows/test.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
pull_request:
77
workflow_dispatch:
88

9+
env:
10+
COVERAGE_PYTHON_VERSION: '3.13'
11+
COVERAGE_PYDANTIC_VERSION: '>=2.6'
12+
913
jobs:
1014
test:
1115
name: Test
@@ -23,7 +27,6 @@ jobs:
2327
runs-on: ${{ matrix.os }}
2428
permissions:
2529
contents: read
26-
code-quality: write
2730
env:
2831
OS: ${{ matrix.os }}
2932
PYTHON_VERSION: ${{ matrix.python-version }}
@@ -51,10 +54,14 @@ jobs:
5154
--cov-report=xml:coverage.xml
5255
--cov-report=markdown-append:"$GITHUB_STEP_SUMMARY"
5356
54-
- name: Upload coverage report
55-
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
56-
uses: actions/upload-code-coverage@v1
57+
- name: Upload coverage to Codecov
58+
if: >-
59+
!cancelled() &&
60+
matrix.python-version == env.COVERAGE_PYTHON_VERSION &&
61+
matrix.pydantic-version == env.COVERAGE_PYDANTIC_VERSION
62+
uses: codecov/codecov-action@v7
5763
with:
58-
file: plugins/${{ github.event.repository.name }}/coverage.xml
59-
language: Python
60-
label: code-coverage/pytest
64+
disable_search: true
65+
files: coverage.xml
66+
flags: unit
67+
working-directory: plugins/${{ github.event.repository.name }}

codecov.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
comment:
2+
require_changes: 'coverage_drop OR uncovered_patch'

0 commit comments

Comments
 (0)