File tree Expand file tree Collapse file tree 3 files changed +410
-351
lines changed
Expand file tree Collapse file tree 3 files changed +410
-351
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,8 @@ jobs:
133133 pytest :
134134 needs : [uv-check]
135135 runs-on : ubuntu-latest
136+ permissions :
137+ id-token : write
136138 env :
137139 UV_NO_SYNC : true
138140 UV_FROZEN : true
@@ -165,7 +167,19 @@ jobs:
165167 key : pytest|${{steps.store-hashed-python-version.outputs.hashed_python_version}}
166168
167169 - name : Run pytest
168- run : uv run -- pytest # TODO: Add GitHub workflows output format
170+ run : uv run pytest --cov --cov-branch --cov-report=xml --junitxml=junit.xml
171+
172+ - name : Upload test results to Codecov
173+ if : ${{ !cancelled() }}
174+ uses : codecov/test-results-action@v1
175+ with :
176+ use_oidc : true
177+
178+ - name : Upload coverage report to Codecov
179+ uses : codecov/codecov-action@v5
180+ if : ${{ !cancelled() }}
181+ with :
182+ use_oidc : true
169183
170184 ruff-lint :
171185 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ main = [
2121 " validators>=0.34" ,
2222]
2323pre-commit = [" pre-commit>=4.0" ]
24- test = [" pytest>=8.3" ]
24+ test = [" pytest-cov>=6.1 " , " pytest >=8.3" ]
2525type-check = [" django-stubs[compatible-mypy]>=5.1" , " mypy>=1.13" , " types-beautifulsoup4>=4.12" ]
2626
2727[project ] # TODO: Remove [project] table once https://github.com/astral-sh/uv/issues/8582 is completed
@@ -207,6 +207,12 @@ parametrize-values-type = "tuple"
207207keep-runtime-typing = true
208208
209209
210+ [tool .coverage .report ]
211+ exclude_also = [" if TYPE_CHECKING:" ]
212+ skip_covered = true
213+ sort = " cover"
214+
215+
210216[tool .pymarkdown ]
211217extensions.front-matter.enabled = true
212218mode.strict-config = true
You can’t perform that action at this time.
0 commit comments