From 6dc07149dc138d0f90bfefd0b9fbc0f219cc2471 Mon Sep 17 00:00:00 2001 From: RainbowMango Date: Tue, 17 Oct 2023 19:29:54 +0800 Subject: [PATCH] Enable unit test in Makefile and upload the coverage to CODECOV Signed-off-by: RainbowMango --- .github/workflows/ci.yml | 2 +- Makefile | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a7ed979ab..3a068fcd6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -101,7 +101,7 @@ jobs: # but adding a token might increase successful uploads as per: # https://community.codecov.com/t/upload-issues-unable-to-locate-build-via-github-actions-api/3954 token: ${{secrets.CODECOV_UPLOAD_TOKEN}} - files: ./_output/coverage/coverage_pkg.txt,./_output/coverage/coverage_cmd.txt,./_output/coverage/coverage_examples.txt + files: ./_output/coverage/coverage_pkg.txt,./_output/coverage/coverage_cmd.txt,./_output/coverage/coverage_examples.txt,./_output/coverage/coverage_operator.txt flags: unittests fail_ci_if_error: false verbose: true diff --git a/Makefile b/Makefile index 6ce41eb2d..b0c83eb25 100644 --- a/Makefile +++ b/Makefile @@ -121,6 +121,7 @@ test: install_gotest $(GOTEST) --race --v ./pkg/... -coverprofile=./_output/coverage/coverage_pkg.txt -covermode=atomic $(GOTEST) --race --v ./cmd/... -coverprofile=./_output/coverage/coverage_cmd.txt -covermode=atomic $(GOTEST) --race --v ./examples/... -coverprofile=./_output/coverage/coverage_examples.txt -covermode=atomic + $(GOTEST) --race --v ./operator/... -coverprofile=./_output/coverage/coverage_operator.txt -covermode=atomic upload-images: images @echo "push images to $(REGISTRY)"