generated from kedacore/github-template
-
Notifications
You must be signed in to change notification settings - Fork 102
134 lines (117 loc) · 4.59 KB
/
e2e-tests.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
name: e2e tests
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
e2e_tests:
runs-on: ubuntu-latest
name: Execute e2e test on AMD64 ${{ matrix.kubernetesVersion }}
strategy:
fail-fast: false
matrix:
kubernetesVersion: [v1.28, v1.27, v1.26]
include:
- kubernetesVersion: v1.28
kindImage: kindest/node:v1.28.0@sha256:b7a4cad12c197af3ba43202d3efe03246b3f0793f162afb40a33c923952d5b31
- kubernetesVersion: v1.27
kindImage: kindest/node:v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72
- kubernetesVersion: v1.26
kindImage: kindest/node:v1.26.6@sha256:6e2d8b28a5b601defe327b98bd1c2d1930b49e5d8c512e1895099e4504007adb
steps:
- name: Install prerequisites
run: |
sudo apt update
sudo apt install curl make ca-certificates gcc libc-dev -y
env:
DEBIAN_FRONTEND: noninteractive
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- name: Helm install
uses: Azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
- name: Create k8s ${{ matrix.kubernetesVersion }} Kind Cluster
uses: helm/kind-action@dda0770415bac9fc20092cacbc54aa298604d140 # v1.8.0
with:
node_image: ${{ matrix.kindImage }}
cluster_name: cluster
config: .github/kind.yaml
- name: Generate images and push to the cluster
run: |
make docker-build
kind load docker-image ghcr.io/kedacore/http-add-on-operator:${VERSION} --name cluster
kind load docker-image ghcr.io/kedacore/http-add-on-interceptor:${VERSION} --name cluster
kind load docker-image ghcr.io/kedacore/http-add-on-scaler:${VERSION} --name cluster
env:
VERSION: ${{ github.sha }}
- name: Show Kubernetes version
run: |
kubectl version
- name: Run e2e test
run: |
make e2e-test
env:
VERSION: ${{ github.sha }}
arm_image_generation:
runs-on: ARM64
name: Generate ARM64 images for e2e tests
steps:
- name: Install prerequisites
run: |
sudo apt update
sudo apt install curl make ca-certificates gcc libc-dev -y
env:
DEBIAN_FRONTEND: noninteractive
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- name: Generate images
run: |
make docker-build
env:
VERSION: ${{ github.sha }}
arm_e2e_tests:
runs-on: ARM64
needs: arm_image_generation
name: Execute e2e test on ARM64 ${{ matrix.kubernetesVersion }}
env:
KUBECONFIG: ${{ github.workspace }}/.kube/config
strategy:
fail-fast: false
matrix:
kubernetesVersion: [v1.28, v1.27, v1.26]
include:
- kubernetesVersion: v1.28
kindImage: kindest/node:v1.28.0@sha256:b7a4cad12c197af3ba43202d3efe03246b3f0793f162afb40a33c923952d5b31
- kubernetesVersion: v1.27
kindImage: kindest/node:v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72
- kubernetesVersion: v1.26
kindImage: kindest/node:v1.26.6@sha256:6e2d8b28a5b601defe327b98bd1c2d1930b49e5d8c512e1895099e4504007adb
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1
with:
go-version: "1.20"
- name: Helm install
uses: Azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
- name: Create k8s ${{ matrix.kubernetesVersion }} Kind Cluster
uses: helm/kind-action@dda0770415bac9fc20092cacbc54aa298604d140 # v1.8.0
with:
node_image: ${{ matrix.kindImage }}
cluster_name: ${{ runner.name }}
config: .github/kind.yaml
- name: Push images to the cluster
run: |
kind load docker-image ghcr.io/kedacore/http-add-on-operator:${VERSION} --name ${{ runner.name }}
kind load docker-image ghcr.io/kedacore/http-add-on-interceptor:${VERSION} --name ${{ runner.name }}
kind load docker-image ghcr.io/kedacore/http-add-on-scaler:${VERSION} --name ${{ runner.name }}
env:
VERSION: ${{ github.sha }}
- name: Show Kubernetes version
run: |
kubectl version
- name: Run e2e test
run: |
make e2e-test
env:
VERSION: ${{ github.sha }}