Skip to content

Commit

Permalink
Include integration tests in code coverage calculation (#427)
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Grimm <[email protected]>
  • Loading branch information
dgn authored Oct 21, 2024
1 parent 67705ba commit 9a048d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
fail_ci_if_error: true
4 changes: 2 additions & 2 deletions Makefile.core.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 9a048d9

Please sign in to comment.