Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: adapt Makefile command to run unit tests #2072

Merged
merged 5 commits into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:

- name: Unit Test ${{ matrix.config.name }}
working-directory: ./${{ matrix.config.folder }}
run: make test
run: make unit-test

- name: Report code coverage
uses: codecov/codecov-action@v3
Expand Down
4 changes: 2 additions & 2 deletions klt-cert-manager/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ fmt: ## Run go fmt against code.
vet: ## Run go vet against code.
go vet ./...

.PHONY: test
test: manifests generate fmt vet envtest ## Run tests.
.PHONY: unit-test
unit-test: manifests generate fmt vet envtest ## Run tests.
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test ./... -coverprofile cover.out

##@ Build
Expand Down
4 changes: 2 additions & 2 deletions lifecycle-operator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ fmt: ## Run go fmt against code.
vet: ## Run go vet against code.
go vet ./...

.PHONY: test
test: manifests fmt vet generate envtest ## Run tests.
.PHONY: unit-test
unit-test: manifests fmt vet generate envtest ## Run tests.
go test ./cmd/... -v -coverprofile cover-cmd.out
go test ./apis/... -v -coverprofile cover-apis.out
go test ./controllers/... -v -coverprofile cover-pkg.out
Expand Down
4 changes: 2 additions & 2 deletions metrics-operator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ fmt: ## Run go fmt against code.
vet: ## Run go vet against code.
go vet ./...

.PHONY: test
test: manifests generate fmt vet envtest ## Run tests.
.PHONY: unit-test
unit-test: manifests generate fmt vet envtest ## Run tests.
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path)" go test ./... -coverprofile cover.out

##@ Build
Expand Down
5 changes: 2 additions & 3 deletions scheduler/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,10 @@ vet: ## Run go vet against code.
e2e-test: manifests envtest ## Run tests.
go test ./test/e2e -v -coverprofile cover.out

.PHONY: test
test: manifests fmt vet envtest## Run tests.
.PHONY: unit-test
unit-test: manifests fmt vet envtest## Run tests.
go test ./pkg/... -coverprofile cover-pkg.out
go test ./cmd/scheduler -coverprofile cover-main.out
go test ./test/... -v -ginkgo.skip-file="e2e"
sed -i '/mode: set/d' cover-pkg.out
sed -i '/mode: set/d' cover-main.out
echo "mode: set" > cover.out
Expand Down
Loading