Skip to content

Commit b644f3a

Browse files
Implement minor workflow fixes
1 parent 4f4caf4 commit b644f3a

File tree

3 files changed

+98
-4
lines changed

3 files changed

+98
-4
lines changed

.github/workflows/check-build-deploy.yaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
enable-cache: true
4545

4646
- name: Install mypy From Locked Dependencies
47-
run: uv sync --no-group dev --group type-check
47+
run: uv sync --no-group dev --group type-check --group test
4848

4949
- name: Store Hashed Python Version
5050
id: store-hashed-python-version
@@ -165,7 +165,19 @@ jobs:
165165
key: pytest|${{steps.store-hashed-python-version.outputs.hashed_python_version}}
166166

167167
- name: Run pytest
168-
run: uv run -- pytest # TODO: Add GitHub workflows output format
168+
run: uv run pytest --cov --cov-branch --cov-report=xml --junitxml=junit.xml
169+
170+
- name: Upload test results to Codecov
171+
if: ${{ !cancelled() }}
172+
uses: codecov/test-results-action@v1
173+
with:
174+
token: ${{ secrets.CODECOV_TOKEN }}
175+
176+
- name: Upload coverage report to Codecov
177+
uses: codecov/codecov-action@v5
178+
if: ${{ !cancelled() }}
179+
with:
180+
token: ${{ secrets.CODECOV_TOKEN }}
169181

170182
ruff-lint:
171183
runs-on: ubuntu-latest

pyproject.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ main = [
2121
"validators>=0.34",
2222
]
2323
pre-commit = ["pre-commit>=4.0"]
24-
test = ["pytest>=8.3"]
24+
test = ["gitpython>=3.1.44", "pytest>=8.3", "pytest-cov>=6.1.1"]
2525
type-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"
207207
keep-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]
211217
extensions.front-matter.enabled = true
212218
mode.strict-config = true

uv.lock

Lines changed: 77 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)