Skip to content

Commit 74e22d3

Browse files
committed
[tool] feat(ci): add codecov (#194)
1 parent d91a8a0 commit 74e22d3

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

.github/workflows/coverage.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Coverage
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
test-and-print-coverage:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: "3.11"
24+
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
python -m pip install -e '.[dev]' coverage
29+
30+
- name: Run tests with coverage
31+
run: python -m coverage run -m unittest
32+
33+
- name: Print coverage summary
34+
run: python -m coverage report -m
35+
36+

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ dev = [
5353
"types-pytz (>=2025.2.0.20250326,<2025.3.0.0)",
5454
"pre-commit (>=4.2.0,<4.3.0)",
5555
"types-python-dateutil (>=2.9.0,<2.10.0)",
56-
"wheel (>=0.45.1,<0.46.0)"
56+
"wheel (>=0.45.1,<0.46.0)",
57+
"coverage>=7.13.5"
5758
]
5859
doc = [
5960
"autoapi (>=2.0.1,<2.1.0)",

0 commit comments

Comments
 (0)