Skip to content

make test #5

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

Merged
merged 3 commits into from
Jul 31, 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
8 changes: 8 additions & 0 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ jobs:
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup protoc
run: |
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.5/protoc-3.19.5-linux-x86_64.zip
unzip protoc-3.19.5-linux-x86_64.zip -d protoc3
- name: Cache Go Dependencies
uses: actions/cache@v2
with:
Expand All @@ -37,7 +41,11 @@ jobs:
restore-keys: ${{ runner.os }}-go-
- name: Run Unit Tests
run: |
export PATH="$PATH:$(pwd)/protoc3/bin"
echo $PATH
make test
rm -rf protoc-3.19.5-linux-x86_64.zip
rm -rf protoc3
git status
# TODO: enable after public
# - name: Publish Unit Test Coverage
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ vet: ## Run go vet against code.
go vet ./...

ENVTEST_ASSETS_DIR=$(shell pwd)/testbin
test: fmt vet ## Run tests.
test: fmt vet generate manifests ## Run tests.
mkdir -p ${ENVTEST_ASSETS_DIR}
source ./artifacts/scripts/setup-envtest.sh; fetch_envtest_tools $(ENVTEST_ASSETS_DIR); setup_envtest_env $(ENVTEST_ASSETS_DIR); go test ./pkg/... -coverprofile cover.out

Expand Down Expand Up @@ -94,7 +94,7 @@ undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/confi

CONTROLLER_GEN = $(shell pwd)/bin/controller-gen
controller-gen: ## Download controller-gen locally if necessary.
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.7.0)
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.10.0)

KUSTOMIZE = $(shell pwd)/bin/kustomize
kustomize: ## Download kustomize locally if necessary.
Expand Down
2 changes: 1 addition & 1 deletion artifacts/scripts/generate_protobuf.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash

protoc --version
if [[ -z "$(which protoc)" || ( "$(protoc --version)" != "libprotoc 3.15."* && "$(protoc --version)" != "libprotoc 3.19."* ) ]]; then
echo "Generating protobuf requires protoc 3.15.x or 3.19.x. Please download and"
echo "install the platform appropriate Protobuf package for your OS: "
Expand Down
16 changes: 5 additions & 11 deletions config/crd/bases/kridge.kusionstack.io_circuitbreakers.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.7.0
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
name: circuitbreakers.kridge.kusionstack.io
spec:
Expand Down Expand Up @@ -100,9 +99,9 @@ spec:
type: array
resources:
description: Resources is a list of resources this rule
applies to. "*" means all in the specified apiGroups. "*/foo"
represents the subresource 'foo' for all resources in
the specified apiGroups.
applies to. "*" means all in the specified apiGroups.
"*/foo" represents the subresource 'foo' for all resources
in the specified apiGroups.
items:
type: string
type: array
Expand Down Expand Up @@ -205,6 +204,7 @@ spec:
"value". The requirements are ANDed.
type: object
type: object
x-kubernetes-map-type: atomic
targets:
items:
type: string
Expand Down Expand Up @@ -313,9 +313,3 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
9 changes: 1 addition & 8 deletions config/crd/bases/kridge.kusionstack.io_managerstates.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.7.0
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
name: managerstates.kridge.kusionstack.io
spec:
Expand Down Expand Up @@ -72,9 +71,3 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
12 changes: 4 additions & 8 deletions config/crd/bases/kridge.kusionstack.io_shardingconfigs.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.7.0
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
name: shardingconfigs.kridge.kusionstack.io
spec:
Expand Down Expand Up @@ -110,6 +109,7 @@ spec:
only "value". The requirements are ANDed.
type: object
type: object
x-kubernetes-map-type: atomic
type: object
type: array
root:
Expand Down Expand Up @@ -211,6 +211,7 @@ spec:
contains only "value". The requirements are ANDed.
type: object
type: object
x-kubernetes-map-type: atomic
type: object
type: array
size:
Expand Down Expand Up @@ -264,6 +265,7 @@ spec:
are ANDed.
type: object
type: object
x-kubernetes-map-type: atomic
webhook:
description: ShardingConfigWebhookConfiguration defines the configuration
of webhook in this application.
Expand Down Expand Up @@ -295,9 +297,3 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
1 change: 0 additions & 1 deletion config/rbac/role.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down
2 changes: 0 additions & 2 deletions config/webhook/manifests.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

---
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
Expand Down Expand Up @@ -73,7 +72,6 @@ webhooks:
- persistentvolumeclaims
- endpoints
sideEffects: None

---
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
Expand Down