Skip to content

Commit ab4405a

Browse files
committed
chore: update Codecov action in CI workflow
- Upgraded Codecov action from v3 to v4 for improved functionality - Added CODECOV_TOKEN secret for secure coverage uploads
1 parent 9e54705 commit ab4405a

File tree

2 files changed

+54
-5
lines changed

2 files changed

+54
-5
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,12 @@ jobs:
5858
run: |
5959
pytest --cov=yokedcache --cov-report=xml --cov-report=term-missing
6060
61-
# - name: Upload coverage to Codecov
62-
# uses: codecov/codecov-action@v3
63-
# with:
64-
# file: ./coverage.xml
65-
# fail_ci_if_error: true
61+
- name: Upload coverage to Codecov
62+
uses: codecov/codecov-action@v4
63+
with:
64+
file: ./coverage.xml
65+
token: ${{ secrets.CODECOV_TOKEN }}
66+
fail_ci_if_error: true
6667

6768
integration-test:
6869
runs-on: ubuntu-latest

codecov.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
codecov:
2+
require_ci_to_pass: true
3+
notify:
4+
wait_for_ci: true
5+
6+
coverage:
7+
precision: 2
8+
round: down
9+
range: "70...95"
10+
11+
status:
12+
project:
13+
default:
14+
target: 80%
15+
threshold: 1%
16+
if_no_uploads: error
17+
if_not_found: success
18+
if_ci_failed: error
19+
patch:
20+
default:
21+
target: 80%
22+
threshold: 1%
23+
if_no_uploads: error
24+
if_not_found: success
25+
if_ci_failed: error
26+
27+
parsers:
28+
gcov:
29+
branch_detection:
30+
conditional: yes
31+
loop: yes
32+
method: no
33+
macro: no
34+
35+
comment:
36+
layout: "reach,diff,flags,tree"
37+
behavior: default
38+
require_changes: false
39+
40+
ignore:
41+
- "tests/"
42+
- "examples/"
43+
- "docs/"
44+
- "htmlcov/"
45+
- "**/__pycache__/"
46+
- "*.pyc"
47+
- "setup.py"
48+
- "conftest.py"

0 commit comments

Comments
 (0)