-
Notifications
You must be signed in to change notification settings - Fork 110
174 lines (153 loc) · 6.17 KB
/
execute_advanced_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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
name: "TESTING:ADVANCED:E2E"
on:
workflow_dispatch:
inputs:
e2e-admin-tests:
type: boolean
required: false
default: false
e2e-upgrade-test:
type: boolean
required: false
default: false
e2e-performance-test:
type: boolean
required: false
default: false
e2e-upgrade-test-light:
type: boolean
required: false
default: false
jobs:
e2e-admin-tests:
if: ${{ github.event.inputs.e2e-admin-tests == 'true' }}
runs-on: buildjet-4vcpu-ubuntu-2204
timeout-minutes: 120
steps:
- name: "Checkout Code"
uses: actions/checkout@v3
- name: Execute e2e-admin-tests
shell: bash
run: |
make start-e2e-admin-test
# Find the container ID of the orchestrator container by its image name
container_id=$(docker ps --filter "ancestor=orchestrator:latest" --format "{{.ID}}")
if [ -z "$container_id" ]; then
echo "Orchestrator container is not currently running. Exiting..."
exit 1
fi
echo "Monitoring Orchestrator container with ID: $container_id"
while true; do
echo "get current status"
current_status=$(docker ps -q | grep $container_id || echo "docker-ps-error")
echo "current status: ${current_status}"
if [ "$current_status" == "docker-ps-error" ]; then
echo "no current container get logs"
docker logs $container_id || echo "no logs"
echo "-----------------------------------"
exit 0
else
echo "Orchestrator container is still running..."
docker logs $container_id || echo "no logs"
fi
sleep 5
done
e2e-upgrade-test:
if: ${{ github.event.inputs.e2e-upgrade-test == 'true' }}
runs-on: buildjet-4vcpu-ubuntu-2204
timeout-minutes: 120
steps:
- name: "Checkout Code"
uses: actions/checkout@v3
- name: Execute upgrade-test
shell: bash
run: |
make start-upgrade-test
# Find the container ID of the orchestrator container by its image name
container_id=$(docker ps --filter "ancestor=orchestrator:latest" --format "{{.ID}}")
if [ -z "$container_id" ]; then
echo "Orchestrator container is not currently running. Exiting..."
exit 1
fi
echo "Monitoring Orchestrator container with ID: $container_id"
while true; do
echo "get current status"
current_status=$(docker ps -q | grep $container_id || echo "docker-ps-error")
echo "current status: ${current_status}"
if [ "$current_status" == "docker-ps-error" ]; then
echo "no current container get logs"
docker logs $container_id || echo "no logs"
echo "-----------------------------------"
exit 0
else
echo "Orchestrator container is still running..."
docker logs $container_id || echo "no logs"
fi
sleep 5
done
e2e-upgrade-test-light:
if: ${{ github.event.inputs.e2e-upgrade-test-light == 'true' }}
runs-on: buildjet-4vcpu-ubuntu-2204
timeout-minutes: 120
steps:
- name: "Checkout Code"
uses: actions/checkout@v3
- name: Execute upgrade-test-light
shell: bash
run: |
make start-upgrade-test-light
# Find the container ID of the orchestrator container by its image name
container_id=$(docker ps --filter "ancestor=orchestrator:latest" --format "{{.ID}}")
if [ -z "$container_id" ]; then
echo "Orchestrator container is not currently running. Exiting..."
exit 1
fi
echo "Monitoring Orchestrator container with ID: $container_id"
while true; do
echo "get current status"
current_status=$(docker ps -q | grep $container_id || echo "docker-ps-error")
echo "current status: ${current_status}"
if [ "$current_status" == "docker-ps-error" ]; then
echo "no current container get logs"
docker logs $container_id || echo "no logs"
echo "-----------------------------------"
exit 0
else
echo "Orchestrator container is still running..."
docker logs $container_id || echo "no logs"
fi
sleep 5
done
e2e-performance-test:
if: ${{ github.event.inputs.e2e-performance-test == 'true' }}
runs-on: buildjet-4vcpu-ubuntu-2204
timeout-minutes: 120
steps:
- name: "Checkout Code"
uses: actions/checkout@v3
- name: Execute Performance Tests
shell: bash
run: |
make start-e2e-performance-test
# Find the container ID of the orchestrator container by its image name
container_id=$(docker ps --filter "ancestor=orchestrator:latest" --format "{{.ID}}")
if [ -z "$container_id" ]; then
echo "Orchestrator container is not currently running. Exiting..."
exit 1
fi
echo "Monitoring Orchestrator container with ID: $container_id"
while true; do
echo "get current status"
current_status=$(docker ps -q | grep $container_id || echo "docker-ps-error")
echo "current status: ${current_status}"
if [ "$current_status" == "docker-ps-error" ]; then
echo "no current container get logs"
docker logs $container_id || echo "no logs"
echo "-----------------------------------"
exit 0
else
echo "Orchestrator container is still running..."
docker logs $container_id || echo "no logs"
fi
sleep 5
done