Skip to content

Commit dbe6b3a

Browse files
authored
Add the codecov to test ci (#28)
1 parent be643ca commit dbe6b3a

File tree

5 files changed

+145
-10
lines changed

5 files changed

+145
-10
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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
__pycache__/
22
.pytest_cache/
3-
.pdm.toml
4-
.pdm-python
5-
.pdm-build/
63
.env
74
.venv
85
venv/
96
.idea/
107
.vscode/
118
.ruff_cache/
129
dist/
10+
.claude/
11+
.coverage
12+
coverage.xml

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,13 @@ repository = "https://github.com/fastapi-practices/fastapi_oauth20"
3030

3131
[dependency-groups]
3232
dev = [
33+
"click==8.2.1",
34+
"fastapi>=0.119.0",
3335
"pytest>=8.4.0",
3436
"pytest-asyncio>=1.2.0",
35-
"fastapi>=0.119.0",
37+
"pytest-cov>=7.0.0",
3638
"respx>=0.22.0",
3739
"ty>=0.0.1a23",
38-
"click==8.2.1",
3940
]
4041
lint = [
4142
"pre-commit>=4.3.0",

requirements.txt

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ colorama==0.4.6 ; sys_platform == 'win32'
2020
# via
2121
# click
2222
# pytest
23+
coverage==7.11.1
24+
# via pytest-cov
2325
distlib==0.4.0
2426
# via virtualenv
2527
exceptiongroup==1.3.0 ; python_full_version < '3.11'
@@ -52,7 +54,9 @@ packaging==25.0
5254
platformdirs==4.5.0
5355
# via virtualenv
5456
pluggy==1.6.0
55-
# via pytest
57+
# via
58+
# pytest
59+
# pytest-cov
5660
pre-commit==4.3.0
5761
pydantic==2.12.2
5862
# via fastapi
@@ -61,17 +65,22 @@ pydantic-core==2.41.4
6165
pygments==2.19.2
6266
# via pytest
6367
pytest==8.4.2
64-
# via pytest-asyncio
68+
# via
69+
# pytest-asyncio
70+
# pytest-cov
6571
pytest-asyncio==1.2.0
72+
pytest-cov==7.0.0
6673
pyyaml==6.0.3
6774
# via pre-commit
6875
respx==0.22.0
6976
sniffio==1.3.1
7077
# via anyio
7178
starlette==0.48.0
7279
# via fastapi
73-
tomli==2.3.0 ; python_full_version < '3.11'
74-
# via pytest
80+
tomli==2.3.0 ; python_full_version <= '3.11'
81+
# via
82+
# coverage
83+
# pytest
7584
ty==0.0.1a23
7685
typing-extensions==4.15.0
7786
# via

0 commit comments

Comments
 (0)