Skip to content

Commit 83f5ff4

Browse files
authored
chore: upload coverage to codecov (#5982)
1 parent 98d923a commit 83f5ff4

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: ci
1+
name: ci-v2
22

33
on:
44
push:
@@ -87,6 +87,14 @@ jobs:
8787
run: |
8888
make unit
8989
90+
- name: Upload test coverage
91+
uses: codecov/codecov-action@v5
92+
with:
93+
flags: unittest
94+
token: ${{ secrets.CODECOV_TOKEN }}
95+
verbose: true
96+
files: ./coverage.txt
97+
9098
verify:
9199
runs-on: ubuntu-24.04
92100
steps:

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@ lint: bin/golangci-lint
116116

117117
.PHONY: unit
118118
unit:
119-
go test $$(go list -e ./... | grep -v tools | grep -v tests)
119+
go test $$(go list -e ./... | grep -v cmd | grep -v tools | grep -v tests | grep -v third_party) \
120+
-cover -coverprofile=coverage.txt -covermode=atomic
121+
sed -i.bak '/generated/d' coverage.txt && rm coverage.txt.bak
120122

121123
.PHONY: check
122124
check: lint unit verify

0 commit comments

Comments
 (0)