Skip to content

Commit

Permalink
update ci
Browse files Browse the repository at this point in the history
Signed-off-by: fangtian <fangtian@kubesphere.io>
  • Loading branch information
tpiperatgod committed Aug 9, 2023
1 parent 07adad7 commit 9081aec
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 18 deletions.
28 changes: 16 additions & 12 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,27 +48,28 @@ jobs:
GO111MODULE: "on"
steps:
- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: 1.18.x
go-version: 1.19

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Check License Header
uses: apache/skywalking-eyes/header@501a28d2fb4a9b962661987e50cf0219631b32ff

- name: Install kubebuilder-3.1.0
- name: Install kubebuilder-3.11.1
run: |
curl -L -o kubebuilder "https://github.com/kubernetes-sigs/kubebuilder/releases/download/v3.1.0/kubebuilder_linux_amd64"
curl -L -o kubebuilder "https://github.com/kubernetes-sigs/kubebuilder/releases/download/v3.11.1/kubebuilder_linux_amd64"
chmod +x kubebuilder && mv kubebuilder /usr/local/bin/
- name: Run basic test
run: make test

Expand All @@ -77,26 +78,29 @@ jobs:

e2e_test:
runs-on: ubuntu-latest
timeout-minutes: 30
timeout-minutes: 60
name: E2E Tests
steps:
- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: 1.18.x
go-version: 1.19

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Create kind cluster
uses: container-tools/kind-action@v1
with:
version: v0.20.0
node_image: kindest/node:v1.26.6

- name: Create busybox pod
run: |
Expand Down Expand Up @@ -141,7 +145,7 @@ jobs:
- name: Install OpenFunction
run: |
kubectl apply -f config/bundle.yaml
kubectl apply --server-side=true -f config/bundle.yaml
kubectl apply -f config/strategy/build-strategy.yaml
kubectl patch deployments.apps -n openfunction openfunction-controller-manager -p "{\"spec\":{\"template\":{\"spec\":{\"containers\":[{\"name\":\"openfunction\",\"image\":\"kind-registry:5000/openfunction/openfunction:latest\",\"resources\":null}]}}}}"
kubectl rollout status -n openfunction deployment openfunction-controller-manager --timeout=1m
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ kustomize: ## Download kustomize locally if necessary.

E2E = $(shell pwd)/bin/e2e
skywalking-e2e: ## Download skywalking-e2e locally if necessary.
$(call go-get-tool,$(E2E),github.com/apache/skywalking-infra-e2e/cmd/e2e@v1.2.0)
$(call go-get-tool,$(E2E),github.com/apache/skywalking-infra-e2e/cmd/e2e@v1.2.1-0.20230623134912-0a5b398fc966)

YQ = $(shell pwd)/bin/yq
yq: ## Download yq locally if necessary.
Expand Down
8 changes: 3 additions & 5 deletions test/kind.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,17 @@ kubeadmConfigPatches:
# patch it further using a JSON 6902 patch
kubeadmConfigPatchesJSON6902:
- group: kubeadm.k8s.io
version: v1beta2
version: v1beta3
kind: ClusterConfiguration
patch: |
- op: add
path: /apiServer/certSANs/-
value: my-hostname
# 1 control plane node (workder)
nodes:
# the control plane node (worker) config
# the control plane node config
- role: control-plane
# image: kindest/node:v1.23.4@sha256:0e34f0d0fd448aa2f2819cfd74e99fe5793a6e4938b328f657c8e3f81ee0dfb9
# image: kindest/node:v1.22.7@sha256:1dfd72d193bf7da64765fd2f2898f78663b9ba366c2aa74be1fd7498a1873166
image: kindest/node:v1.21.10@sha256:84709f09756ba4f863769bdcabe5edafc2ada72d3c8c44d6515fc581b66b029c
image: kindest/node:v1.26.6@sha256:6e2d8b28a5b601defe327b98bd1c2d1930b49e5d8c512e1895099e4504007adb
extraPortMappings:
- containerPort: 31234
hostPort: 80
Expand Down

0 comments on commit 9081aec

Please sign in to comment.