Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[run]
omit = tests/*
27 changes: 23 additions & 4 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run Pytest
name: Run Pytest with Coverage

on:
push:
Expand Down Expand Up @@ -35,8 +35,27 @@ jobs:
- name: Create virtual environment and install dependencies
run: |
uv venv
uv sync
uv sync --dev # Include dev tools like pytest and pytest-cov

- name: Run tests
- name: Run tests and generate Cobertura coverage report
run: |
uv run pytest
mkdir -p coverage
PYTHONPATH=. uv run pytest \
--cov \
--cov-report=term-missing \
--cov-report=xml:coverage/cobertura.xml \
--cov-fail-under=80 \
--cov-report=html:coverage/html

- name: Code Coverage Report
uses: irongut/CodeCoverageSummary@v1.3.0
with:
filename: coverage/cobertura.xml
badge: true
fail_below_min: true
format: markdown
hide_branch_rate: true
hide_complexity: true
indicators: true
output: console
thresholds: '80 80'
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ dev = [
"polyfactory>=2.21.0",
"pytest>=8.3.5",
"pytest-mock>=3.14.0",
"pytest-cov>=4.1.0",
]
Loading