Skip to content

Commit 5f36770

Browse files
committed
fix: codecov with token
Signed-off-by: ashing <axingfly@gmail.com>
1 parent d9cf0f6 commit 5f36770

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

.github/workflows/codecov.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Go Unit Test
1+
name: Codecov
22

33
on:
44
push:
@@ -30,5 +30,9 @@ jobs:
3030
- name: run codecov.sh
3131
run: bash scripts/codecov.sh
3232

33-
- name: Publish to codecov.io
34-
run: bash <(curl -s https://codecov.io/bash)
33+
- name: Upload coverage reports to Codecov
34+
uses: codecov/codecov-action@v4.0.1
35+
with:
36+
token: ${{ secrets.CODECOV_TOKEN }}
37+
flags: unittest
38+
fail_ci_if_error: true

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
- [algorithm-coding](#algorithm-coding)
66
- [coding time](#coding-time)
7+
- [codecov](#codecov)
78
- [stats](#stats)
89
- [acknowledgement](#acknowledgement)
910

@@ -18,6 +19,13 @@ It covers essential topics for technical interviews, providing detailed explanat
1819

1920
![wakatime](https://wakatime.com/badge/user/01c864c3-99e2-47a2-ad28-cc0f36b02f39/project/19417b50-3182-4aca-8dec-a35aa5133c91.svg)
2021

22+
### codecov
23+
24+
[![codecov](https://codecov.io/github/InterviewTips/algorithm-coding/graph/badge.svg?token=Y099UQ3IBP)](https://codecov.io/github/InterviewTips/algorithm-coding)
25+
26+
[![codecov](https://codecov.io/github/InterviewTips/algorithm-coding/graphs/icicle.svg?token=Y099UQ3IBP)](https://codecov.io/github/InterviewTips/algorithm-coding)
27+
28+
2129
### stats
2230

2331
| ![](https://stats.justsong.cn/api/leetcode?username=ashing&cn=true) | ![](https://stats.justsong.cn/api/leetcode?username=ronething) |

codecov.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
coverage:
2+
status:
3+
project:
4+
default:
5+
target: 75% # the required coverage value
6+
threshold: 1% # the leniency in hitting the target
7+
codecov:
8+
require_ci_to_pass: true

0 commit comments

Comments
 (0)