Skip to content

Commit

Permalink
chore: upload coverage to codecov (#5982)
Browse files Browse the repository at this point in the history
  • Loading branch information
csuzhangxc authored Dec 18, 2024
1 parent 98d923a commit 83f5ff4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/ci.yaml → .github/workflows/ci-v2.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ci
name: ci-v2

on:
push:
Expand Down Expand Up @@ -87,6 +87,14 @@ jobs:
run: |
make unit
- name: Upload test coverage
uses: codecov/codecov-action@v5
with:
flags: unittest
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
files: ./coverage.txt

verify:
runs-on: ubuntu-24.04
steps:
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ lint: bin/golangci-lint

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

.PHONY: check
check: lint unit verify
Expand Down

0 comments on commit 83f5ff4

Please sign in to comment.