From ba713e931411daffe3c6f402fa422b5091cc2bde Mon Sep 17 00:00:00 2001 From: Vitor Floriano <107767584+vitorfloriano@users.noreply.github.com> Date: Fri, 15 May 2026 09:16:14 -0300 Subject: [PATCH] ci: output test coverprofile to artifacts tab in prow When run in CI, the coverprofile output from the test will be sent to the artifacts tab in Prow. When run locally, make test will output the file to the root of the repo. --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0204bc0..f58f420 100644 --- a/Makefile +++ b/Makefile @@ -27,6 +27,7 @@ TEST_DIR := test TOOLS_DIR := hack/tools TOOLS_BIN_DIR := $(abspath $(TOOLS_DIR)/$(BIN_DIR)) GO_INSTALL := ./scripts/go_install.sh +ARTIFACTS ?= . export PATH := $(abspath $(TOOLS_BIN_DIR)):$(PATH) @@ -388,7 +389,7 @@ undeploy-full: undeploy ## Undeploy with all features. .PHONY: test test: manifests generate fmt vet setup-envtest ## Run tests. - KUBEBUILDER_ASSETS="$(KUBEBUILDER_ASSETS)" go test $$(go list ./... | grep -v /e2e) -coverprofile cover.out + KUBEBUILDER_ASSETS="$(KUBEBUILDER_ASSETS)" go test $$(go list ./... | grep -v /e2e) -coverprofile $(ARTIFACTS)/cover.out # TODO(user): To use a different vendor for e2e tests, modify the setup under 'tests/e2e'. # The default setup assumes Kind is pre-installed and builds/loads the Manager Docker image locally.