File tree Expand file tree Collapse file tree 2 files changed +47
-1
lines changed
Expand file tree Collapse file tree 2 files changed +47
-1
lines changed Original file line number Diff line number Diff line change 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@v6
19+
20+ - name : Setup uv
21+ uses : astral-sh/setup-uv@v8.0.0
22+ with :
23+ python-version : " 3.12"
24+
25+ - name : Install dependencies
26+ run : |
27+ uv venv && uv pip install -e '.[dev]' coverage
28+
29+ - name : Run tests with coverage
30+ run : uv run coverage run -m unittest
31+
32+ - name : Print coverage summary
33+ run : uv run coverage report -m --fail-under=70
34+
35+ - name : Generate coverage XML
36+ run : uv run coverage xml -o coverage.xml
37+
38+ - name : Upload coverage to Codecov
39+ if : ${{ !cancelled() && hashFiles('coverage.xml') != '' }}
40+ uses : codecov/codecov-action@v5
41+ with :
42+ token : ${{ secrets.CODECOV_TOKEN }}
43+ flags : connectors
44+ fail_ci_if_error : false
45+ verbose : true
Original file line number Diff line number Diff 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]
5859doc = [
5960 " autoapi (>=2.0.1,<2.1.0)" ,
You can’t perform that action at this time.
0 commit comments