Skip to content

Commit

Permalink
ci: report unittest coverage (#4783)
Browse files Browse the repository at this point in the history
Signed-off-by: zhangzujian <[email protected]>
  • Loading branch information
zhangzujian authored Dec 4, 2024
1 parent 6ee3b36 commit 86ad84b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/build-x86-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ jobs:
go install -mod=mod github.com/onsi/ginkgo/v2/ginkgo
make ut
- uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: profile.cov

- name: Install golangci-lint
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin $GOLANGCI_LINT_VERSION
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ test/**/*.test
*.html
cover.out
cover.html
profile.cov
kube-ovn-app-sa.yaml
kube-ovn-cni-sa.yaml
kube-ovn-sa.yaml
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,7 @@ scan:
.PHONY: ut
ut:
ginkgo -mod=mod --show-node-events --poll-progress-after=60s $(GINKGO_OUTPUT_OPT) -v test/unittest
go test ./pkg/...
go test -coverprofile=profile.cov $$(go list ./pkg/... | grep -vw '^github.com/kubeovn/kube-ovn/pkg/client')

.PHONY: ovs-sandbox
ovs-sandbox: clean-ovs-sandbox
Expand Down

0 comments on commit 86ad84b

Please sign in to comment.