Skip to content

Commit 3398a1d

Browse files
committed
fix: Makefile
Signed-off-by: Zach Aller <[email protected]>
1 parent 84a2372 commit 3398a1d

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ jobs:
4545
uses: actions/upload-artifact@v4
4646
with:
4747
name: code-coverage
48-
path: cover.out
48+
path: cover-*.out
4949
- name: Upload code coverage information to codecov.io
5050
if: ${{ !cancelled() }}
5151
uses: codecov/[email protected]
5252
with:
53-
files: cover.out
53+
files: cover.out, cover-go-unit.out
5454
fail_ci_if_error: false
5555
env:
5656
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

Makefile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,12 @@ vet: ## Run go vet against code.
7979
go vet ./...
8080

8181
.PHONY: test
82-
test: manifests generate fmt vet envtest ## Run tests.
83-
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test $$(go list ./... | grep -v /e2e) -coverprofile cover.out
82+
test: manifests generate fmt vet envtest ## Run Ginkgo tests using go test, we prefer to use test-parallel but this target is nice because it dose not require ginkgo cli.
83+
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test -run TestControllersGinkgo ./... -coverprofile cover.out
8484

8585
.PHONY: go-unit-test
86-
go-unit-test: ## Run unit tests
87-
@echo "Running tests excluding TestControllersGinkgo..."
88-
@go test $$(go test ./... -list . | grep -v "^ok" | grep -v "TestControllersGinkgo")
86+
go-unit-test: ## Run go unit tests
87+
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test -run ^TestControllersGinkgo ./... -coverprofile cover-go-unit.out
8988

9089
# Utilize Kind or modify the e2e tests to load the image locally, enabling compatibility with other vendors.
9190
.PHONY: test-e2e # Run the e2e tests against a Kind k8s instance that is spun up.

0 commit comments

Comments
 (0)