Skip to content

Commit 5f55a0c

Browse files
authored
Add the codecov to test ci (#81)
1 parent de581c5 commit 5f55a0c

File tree

5 files changed

+152
-5
lines changed

5 files changed

+152
-5
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,9 @@ jobs:
2828
uv sync
2929
3030
- name: Run test
31-
run: uv run pytest
31+
run: uv run pytest --cov --cov-report=xml
32+
33+
- name: Upload coverage reports to Codecov
34+
uses: codecov/codecov-action@v5
35+
with:
36+
token: ${{ secrets.CODECOV_TOKEN }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ dist/
88
.pytest_cache/
99
.ruff_cache/
1010
.claude/
11+
.coverage
12+
coverage.xml

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ dev = [
3131
"aiosqlite>=0.21.0",
3232
"pytest>=8.4.0",
3333
"pytest-asyncio>=1.2.0",
34+
"pytest-cov>=7.0.0",
3435
"ty>=0.0.1a23",
3536
]
3637
lint = [

requirements.txt

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ cfgv==3.4.0
1010
# via pre-commit
1111
colorama==0.4.6 ; sys_platform == 'win32'
1212
# via pytest
13+
coverage==7.11.1
14+
# via pytest-cov
1315
distlib==0.4.0
1416
# via virtualenv
1517
exceptiongroup==1.3.0 ; python_full_version < '3.11'
@@ -29,7 +31,9 @@ packaging==25.0
2931
platformdirs==4.5.0
3032
# via virtualenv
3133
pluggy==1.6.0
32-
# via pytest
34+
# via
35+
# pytest
36+
# pytest-cov
3337
pre-commit==4.3.0
3438
pydantic==2.12.2
3539
# via sqlalchemy-crud-plus
@@ -38,14 +42,19 @@ pydantic-core==2.41.4
3842
pygments==2.19.2
3943
# via pytest
4044
pytest==8.4.2
41-
# via pytest-asyncio
45+
# via
46+
# pytest-asyncio
47+
# pytest-cov
4248
pytest-asyncio==1.2.0
49+
pytest-cov==7.0.0
4350
pyyaml==6.0.3
4451
# via pre-commit
4552
sqlalchemy==2.0.44
4653
# via sqlalchemy-crud-plus
47-
tomli==2.3.0 ; python_full_version < '3.11'
48-
# via pytest
54+
tomli==2.3.0 ; python_full_version <= '3.11'
55+
# via
56+
# coverage
57+
# pytest
4958
ty==0.0.1a23
5059
typing-extensions==4.15.0
5160
# via

0 commit comments

Comments
 (0)