forked from apache/incubator-kie-kogito-serverless-operator
-
Notifications
You must be signed in to change notification settings - Fork 1
126 lines (103 loc) · 3.51 KB
/
e2e.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
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
name: E2E checks
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- "LICENSE"
- "**/.gitignore"
- "**.md"
- "**.adoc"
- "*.txt"
- "docsimg/**"
- ".ci/jenkins/**"
env:
GO_VERSION: 1.22
PYTHON_VERSION: "3.10"
KIND_VERSION: v0.20.0
KNATIVE_VERSION: v1.12.5
PROMETHEUS_VERSION: v0.70.0
OPERATOR_IMAGE_NAME: "127.0.0.1:5001/kogito-serverless-operator:0.0.1"
jobs:
e2e:
concurrency:
group: sonataflow-operator-e2e-tests-${{ github.head_ref }}
cancel-in-progress: true
timeout-minutes: 120
runs-on: ubuntu-latest
name: End-to-End Tests (Kind)
steps:
- name: Install Dependencies
run: |
sudo apt-get update && \
sudo apt-get -y install --no-install-recommends \
btrfs-progs \
libgpgme-dev \
libbtrfs-dev \
libdevmapper-dev \
libkrb5-dev
- name: Checkout Code
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache: true
- name: Setup Python for Cekit
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
cache-dependency-path: images/requirements.txt
cache: 'pip'
- name: Install Cekit
run: |
pip install -r images/requirements.txt
cekit --version
- name: Setup Kind Cluster
run: make KIND_VERSION=${{ env.KIND_VERSION }} BUILDER=docker create-cluster
- name: Deploy Knative Eventing and Serving
run: make KNATIVE_VERSION=${{ env.KNATIVE_VERSION }} deploy-knative
- name: Deploy Prometheus
run: make PROMETHEUS_VERSION=${{ env.PROMETHEUS_VERSION }} deploy-prometheus
- name: Set OPERATOR_IMAGE_NAME to Point to Kind's Local Registry
run: echo "OPERATOR_IMAGE_NAME=${{ env.OPERATOR_IMAGE_NAME }}" >> $GITHUB_ENV
- name: Build and Load Operator Image
run: |
make container-build BUILDER=docker IMG=${{ env.OPERATOR_IMAGE_NAME }}
kind load docker-image ${{ env.OPERATOR_IMAGE_NAME }}
- name: Check Pods
run: |
kubectl version
kubectl get pods -A
- name: Deploy Operator
run: |
make deploy IMG=${{ env.OPERATOR_IMAGE_NAME }}
kubectl wait pod -A -l control-plane=sonataflow-operator --for condition=Ready
- name: Run E2E Tests for Ephemeral Flows
run: make test-e2e label=flows-ephemeral
- name: Run E2E Tests for Persistent Flows
run: make test-e2e label=flows-persistence
- name: Run E2E Tests for Workflow Monitoring
run: make test-e2e label=flows-monitoring
- name: Run E2E Tests for Platform
run: make test-e2e label=platform
- name: Run E2E Tests for Cluster Platform
run: make test-e2e label=cluster
- name: Get KIND Logs After Failure
if: failure()
run: |
kubectl get events
kubectl get pod -A
- name: Export KIND Logs
if: always()
run: |
mkdir -p /tmp/kind/logs
kind export logs --loglevel=debug /tmp/kind/logs
- name: Upload KIND Logs
if: always()
uses: actions/upload-artifact@v4
with:
name: kind-logs-${{ job.name }}-${{ github.run_id }}
path: /tmp/kind/logs
retention-days: 1