-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #77 from Kuadrant/general-enhancements
Several enhancements
- Loading branch information
Showing
25 changed files
with
273 additions
and
574 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,23 +37,16 @@ jobs: | |
id: go | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
- name: Create k8s Kind Cluster | ||
uses: helm/[email protected] | ||
with: | ||
version: v0.20.0 | ||
config: utils/kind-cluster.yaml | ||
cluster_name: ${{ env.KIND_CLUSTER_NAME }} | ||
wait: 120s | ||
- name: Check cluster info | ||
run: | | ||
kubectl cluster-info dump | ||
- name: Run make env-setup | ||
run: | | ||
make env-setup | ||
- name: Run tests | ||
run: | | ||
make test | ||
- name: Report to CodeCov | ||
uses: codecov/codecov-action@v2 | ||
- name: Upload test coverage reports to CodeCov | ||
# more at https://github.com/codecov/codecov-action | ||
# Only run if the feature branch is in your repo (not in a fork) | ||
# as Tokenless uploading is rate limited for public repos | ||
if: github.event.pull_request.head.repo.full_name == github.repository | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
files: "*.coverprofile" | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
fail_ci_if_error: false | ||
verbose: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ SHELL := /bin/bash | |
MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) | ||
PROJECT_PATH := $(patsubst %/,%,$(dir $(MKFILE_PATH))) | ||
GO ?= go | ||
KUADRANT_NAMESPACE=kuadrant-system | ||
|
||
all: help | ||
|
||
|
@@ -14,10 +13,17 @@ help: Makefile | |
# Ginkgo tool | ||
GINKGO = $(PROJECT_PATH)/bin/ginkgo | ||
$(GINKGO): | ||
$(call go-install-tool,$(GINKGO),github.com/onsi/ginkgo/[email protected]) | ||
# In order to make sure the version of the ginkgo cli installed | ||
# is the same as the version of go.mod, | ||
# instead of calling go-install-tool, | ||
# running go install from the current module will pick version from current go.mod file. | ||
GOBIN=$(PROJECT_PATH)/bin go install github.com/onsi/ginkgo/v2/ginkgo | ||
|
||
.PHONY: ginkgo | ||
ginkgo: $(GINKGO) ## Download ginkgo locally if necessary. | ||
|
||
KIND = $(PROJECT_PATH)/bin/kind | ||
KIND_VERSION = v0.20.0 | ||
KIND_VERSION = v0.22.0 | ||
$(KIND): | ||
$(call go-install-tool,$(KIND),sigs.k8s.io/kind@$(KIND_VERSION)) | ||
|
||
|
@@ -33,10 +39,17 @@ kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary. | |
|
||
## test: Run unit tests | ||
.PHONY : test | ||
test: fmt vet $(GINKGO) | ||
# huffle both the order in which specs within a suite run, and the order in which different suites run | ||
test: clean-cov fmt vet $(GINKGO) | ||
mkdir -p $(PROJECT_PATH)/coverage | ||
# Shuffle both the order in which specs within a suite run, and the order in which different suites run | ||
# You can always rerun a given ordering later by passing the --seed flag a matching seed. | ||
$(GINKGO) --randomizeAllSpecs --randomizeSuites -v -progress --trace --cover ./... | ||
$(GINKGO) \ | ||
--randomize-all \ | ||
--randomize-suites \ | ||
--coverpkg ./pkg/...,./cmd/... \ | ||
--output-dir $(PROJECT_PATH)/coverage \ | ||
--coverprofile cover.out \ | ||
./pkg/... ./cmd/... | ||
|
||
## install: Build and install kuadrantctl binary ($GOBIN or GOPATH/bin) | ||
.PHONY : install | ||
|
@@ -50,10 +63,7 @@ prepare-local-cluster: $(KIND) ## Deploy locally kuadrant operator from the curr | |
|
||
.PHONY: env-setup | ||
env-setup: | ||
$(MAKE) olm-install | ||
$(MAKE) gateway-api-install | ||
$(MAKE) istio-install | ||
$(MAKE) deploy-gateway | ||
|
||
## local-setup: Sets up Kind cluster with GatewayAPI manifests and istio GW, nothing Kuadrant. Build and install kuadrantctl binary | ||
.PHONY: local-setup | ||
|
@@ -74,5 +84,9 @@ fmt: | |
vet: | ||
$(GO) vet ./... | ||
|
||
.PHONY: clean-cov | ||
clean-cov: ## Remove coverage reports | ||
rm -rf $(PROJECT_PATH)/coverage | ||
|
||
# Include last to avoid changing MAKEFILE_LIST used above | ||
include ./make/*.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
--- | ||
resources: | ||
- github.com/kubernetes-sigs/gateway-api/config/crd?ref=v0.6.2 | ||
- github.com/kubernetes-sigs/gateway-api/config/crd?ref=v1.0.0 |
Oops, something went wrong.