Skip to content

Commit 9a048d9

Browse files
authored
Include integration tests in code coverage calculation (openshift-service-mesh#427)
Signed-off-by: Daniel Grimm <[email protected]>
1 parent 67705ba commit 9a048d9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.github/workflows/coverage.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ jobs:
1010

1111
- name: Run coverage
1212
run: |
13-
make test.unit \
13+
make test \
1414
-e COVERAGE=true
1515
1616
- name: Upload to Codecov
1717
uses: codecov/codecov-action@v4
1818
with:
19-
file: out/coverage.out
19+
files: out/coverage-unit.out,out/coverage-integration.out
2020
token: ${{ secrets.CODECOV_TOKEN }}
21-
fail_ci_if_error: true
21+
fail_ci_if_error: true

Makefile.core.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ ENVTEST_K8S_VERSION ?= 1.29.0
7171
# Set DOCKER_BUILD_FLAGS to specify flags to pass to 'docker build', default to empty. Example: --platform=linux/arm64
7272
DOCKER_BUILD_FLAGS ?= "--platform=$(TARGET_OS)/$(TARGET_ARCH)"
7373

74-
GOTEST_FLAGS := $(if $(VERBOSE),-v) $(if $(COVERAGE),-coverprofile=$(REPO_ROOT)/out/coverage.out)
75-
GINKGO_FLAGS := $(if $(VERBOSE),-v) $(if $(CI),--no-color)
74+
GOTEST_FLAGS := $(if $(VERBOSE),-v) $(if $(COVERAGE),-coverprofile=$(REPO_ROOT)/out/coverage-unit.out)
75+
GINKGO_FLAGS := $(if $(VERBOSE),-v) $(if $(CI),--no-color) $(if $(COVERAGE),-coverprofile=coverage-integration.out -coverpkg=./... --output-dir=out)
7676

7777
# CHANNELS define the bundle channels used in the bundle.
7878
# Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable")

0 commit comments

Comments
 (0)