diff --git a/.github/workflows/build-x86-image.yaml b/.github/workflows/build-x86-image.yaml index 95b3a80bb19..62847e7d8fb 100644 --- a/.github/workflows/build-x86-image.yaml +++ b/.github/workflows/build-x86-image.yaml @@ -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 diff --git a/.gitignore b/.gitignore index 5a68eb88a5f..35f10bb4fb7 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/Makefile b/Makefile index 31f4f6488e3..2e5ba45bf44 100644 --- a/Makefile +++ b/Makefile @@ -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