File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # ref: https://docs.codecov.com/docs/codecovyml-reference
2+ coverage :
3+ range : 80..100
4+ round : down
5+ precision : 1
6+ status :
7+ # ref: https://docs.codecov.com/docs/commit-status
8+ project :
9+ default :
10+ # Avoid false negatives
11+ threshold : 1%
12+
13+ ignore :
14+ - " **/*_scale.go"
15+ - " **/*mock*.go"
16+ - " **/mocks/*.go"
Original file line number Diff line number Diff line change 7474 with :
7575 report_paths : " **/unit-tests.xml"
7676 annotate_only : true
77+
78+ coverage :
79+ runs-on : ubuntu-latest
80+ steps :
81+ - uses : actions/checkout@v4
82+ - name : set up go
83+ uses : actions/setup-go@v4
84+ with :
85+ check-latest : true
86+ go-version-file : " go.mod"
87+ - name : setup env
88+ run : make install
89+ - name : test coverage
90+ run : make cover
91+ - name : Upload to codecov.io
92+ uses : codecov/codecov-action@v3
93+ with :
94+ fail_ci_if_error : true
95+ token : ${{ secrets.CODECOV_TOKEN }}
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ lint-github-action:
5555.PHONY : lint-github-action
5656
5757cover :
58- go test -coverprofile=cover.out -timeout 0 -p 1 $(UNIT_TESTS )
58+ go test -coverprofile=cover.out -timeout 0 -p 1 -coverpkg=./... $(UNIT_TESTS )
5959.PHONY : cover
6060
6161staticcheck :
You can’t perform that action at this time.
0 commit comments