From 9a048d9a941faa6fa62a3394138032d7be4bb12c Mon Sep 17 00:00:00 2001 From: Daniel Grimm Date: Mon, 21 Oct 2024 12:19:55 +0200 Subject: [PATCH] Include integration tests in code coverage calculation (#427) Signed-off-by: Daniel Grimm --- .github/workflows/coverage.yaml | 6 +++--- Makefile.core.mk | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml index d81d346a2..65d51fb94 100644 --- a/.github/workflows/coverage.yaml +++ b/.github/workflows/coverage.yaml @@ -10,12 +10,12 @@ jobs: - name: Run coverage run: | - make test.unit \ + make test \ -e COVERAGE=true - name: Upload to Codecov uses: codecov/codecov-action@v4 with: - file: out/coverage.out + files: out/coverage-unit.out,out/coverage-integration.out token: ${{ secrets.CODECOV_TOKEN }} - fail_ci_if_error: true \ No newline at end of file + fail_ci_if_error: true diff --git a/Makefile.core.mk b/Makefile.core.mk index 087c8bdd8..c22636c5d 100644 --- a/Makefile.core.mk +++ b/Makefile.core.mk @@ -71,8 +71,8 @@ ENVTEST_K8S_VERSION ?= 1.29.0 # Set DOCKER_BUILD_FLAGS to specify flags to pass to 'docker build', default to empty. Example: --platform=linux/arm64 DOCKER_BUILD_FLAGS ?= "--platform=$(TARGET_OS)/$(TARGET_ARCH)" -GOTEST_FLAGS := $(if $(VERBOSE),-v) $(if $(COVERAGE),-coverprofile=$(REPO_ROOT)/out/coverage.out) -GINKGO_FLAGS := $(if $(VERBOSE),-v) $(if $(CI),--no-color) +GOTEST_FLAGS := $(if $(VERBOSE),-v) $(if $(COVERAGE),-coverprofile=$(REPO_ROOT)/out/coverage-unit.out) +GINKGO_FLAGS := $(if $(VERBOSE),-v) $(if $(CI),--no-color) $(if $(COVERAGE),-coverprofile=coverage-integration.out -coverpkg=./... --output-dir=out) # CHANNELS define the bundle channels used in the bundle. # Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable")