-
Notifications
You must be signed in to change notification settings - Fork 1k
101 lines (86 loc) · 2.86 KB
/
operator-e2e-integration-tests.yml
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
# .github/workflows/operator-e2e-integration-tests.yml
name: Operator e2e tests
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
- labeled
paths-ignore:
- 'community/**'
- 'docs/**'
- 'examples/**'
jobs:
operator-e2e-tests:
timeout-minutes: 40
if:
((github.event.action == 'labeled' && (github.event.label.name == 'approved' || github.event.label.name == 'lgtm' || github.event.label.name == 'ok-to-test')) ||
(github.event.action != 'labeled' && (contains(github.event.pull_request.labels.*.name, 'ok-to-test') || contains(github.event.pull_request.labels.*.name, 'approved') || contains(github.event.pull_request.labels.*.name, 'lgtm')))) &&
github.repository == 'feast-dev/feast'
runs-on: ubuntu-latest
services:
kind:
# Specify the Kubernetes version
image: kindest/node:v1.30.6
env:
KIND_CLUSTER: "operator-e2e-cluster"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22.9
- name: Create KIND cluster
run: |
cat <<EOF | kind create cluster --name $KIND_CLUSTER --wait 10m --config=-
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
extraMounts:
- hostPath: /tmp/kind
containerPath: /var/lib/containerd
EOF
- name: Set up kubernetes context
run: |
kubectl config use-context kind-$KIND_CLUSTER
echo "kind context is switched to cluster kind-$KIND_CLUSTER"
- name: Run E2E tests
run: |
# Run the e2e tests
cd infra/feast-operator/
make test-e2e
- name: Clean up docker images
if: always()
run: |
docker images --format '{{.Repository}}:{{.Tag}}' | grep 'feast' | xargs -r docker rmi -f
docker system prune -a -f
- name: Run Previous version tests
run: |
# Run the previous version tests
cd infra/feast-operator/
make test-previous-version
- name: Clean up docker images
if: always()
run: |
docker images --format '{{.Repository}}:{{.Tag}}' | grep 'feast' | xargs -r docker rmi -f
docker system prune -a -f
- name: Run Upgrade tests
run: |
# Run the upgrade tests
cd infra/feast-operator/
make test-upgrade
- name: Debug KIND Cluster when there is a failure
if: failure()
run: |
kubectl get pods --all-namespaces
kubectl describe nodes
- name: Clean up
if: always()
run: |
# Delete the KIND cluster after tests
kind delete cluster --name kind-$KIND_CLUSTER