-
Notifications
You must be signed in to change notification settings - Fork 883
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add code coverage check pipeline #3344
Comments
/assign @william-wang @Monokaix |
It's a good idea, but this may increase the threshold for contributors to submit PR. |
Write relative UTs is the basic skill for a developer. And sometimes new PR will break old fixes without UTs. |
@lowang-bh It seems no one working on this, can I take this up? |
Of couse. You are welcome. /assign @VasuDevrani |
so i was working on this and for the step to run test - name: Run tests and generate coverage report
run: |
make unit-test
go test ./... -coverprofile=coverage.out
go tool cover -func=coverage.out > coverage.txt the ci is failing with some kind of Kubeconfig error [here]: E0516 02:53:19.986663 39759 utils.go:43] init kubeclient in 4pdvgpu failed: stat /home/runner/.kube/config: no such file or directory
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x16d78bd]
goroutine 1 [running]:
volcano.sh/apis/pkg/client/clientset/versioned.NewForConfig(0x0?)
/home/runner/go/pkg/mod/volcano.sh/apis@v1.9.0/pkg/client/clientset/versioned/clientset.go:92 +0x1d
volcano.sh/apis/pkg/client/clientset/versioned.NewForConfigOrDie(...)
/home/runner/go/pkg/mod/volcano.sh/apis@v1.9.0/pkg/client/clientset/versioned/clientset.go:153
volcano.sh/volcano/test/e2e/jobp.TestMain(0x1c51e00?)
/home/runner/work/volcano/volcano/test/e2e/jobp/main_test.go:35 +0x67
main.main()
_testmain.go:83 +0x1e6
FAIL volcano.sh/volcano/test/e2e/jobp 0.023s
E0516 02:53:19.986155 39760 utils.go:43] init kubeclient in 4pdvgpu failed: stat /home/runner/.kube/config: no such file or directory
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1643a3d] this does not happen when tests are run locally, do i need to add some config secret/file? what do you think? |
I think we can intall Codecov Report App as karmada do in pr karmada-io/karmada#4950. To install the app: https://github.com/apps/codecov/installations/select_target |
I think this is a issue. We'd better not to use a kubeconfig file. |
What would you like to be added:
Please add a github pipeline to check code coverage.
Why is this needed:
Make sure a commit has necessary UTs and UTs are effective to cover its relative changes。
The text was updated successfully, but these errors were encountered: