forked from Apicurio/apicurio-registry
-
Notifications
You must be signed in to change notification settings - Fork 0
222 lines (187 loc) · 7.53 KB
/
integration-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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
name: Integration Tests Workflow
on:
push:
paths-ignore:
- '.gitignore'
- 'LICENSE'
- 'README*'
- 'docs/**'
- '.github/workflows/**'
branches: [main, '[1-9].[1-9].x', 2.4.x, 2.5.x]
pull_request:
paths-ignore:
- '.gitignore'
- 'LICENSE'
- 'README*'
- 'docs/**'
branches: [main, '[1-9].[0-9].x']
concurrency:
# Only run once for latest commit per ref and cancel other (previous) runs.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
prepare-sql-tests:
name: Prepare for SQL Integration Tests
runs-on: ubuntu-20.04
if: github.repository_owner == 'Apicurio' && !contains(github.event.*.labels.*.name, 'DO NOT MERGE')
steps:
- name: Show Actor
run: echo ${{github.actor}}
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
- name: Get maven wrapper
run: mvn -N io.takari:maven:wrapper -Dmaven=3.8.2
- name: Build Sql Variant
run: make SKIP_TESTS=true BUILD_FLAGS='-Dmaven.javadoc.skip=true --no-transfer-progress -Dmaven.wagon.httpconnectionManager.maxTotal=30 -Dmaven.wagon.http.retryHandler.count=5' build-sql
- name: Build and Push Sql image
env:
IMAGE_REPO: ttl.sh/${{ github.sha }}
# maximum allowed
IMAGE_TAG: 1d
run: make build-sql-image push-sql-image
prepare-kafkasql-tests:
name: Prepare for KafkaSQL Integration Tests
runs-on: ubuntu-20.04
if: github.repository_owner == 'Apicurio' && !contains(github.event.*.labels.*.name, 'DO NOT MERGE')
steps:
- name: Show Actor
run: echo ${{github.actor}}
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
- name: Get maven wrapper
run: mvn -N io.takari:maven:wrapper -Dmaven=3.8.2
- name: Build kafkasql Variant
run: make SKIP_TESTS=true BUILD_FLAGS='-DskipUiBuild=true -Dmaven.javadoc.skip=true --no-transfer-progress -Dmaven.wagon.httpconnectionManager.maxTotal=30 -Dmaven.wagon.http.retryHandler.count=5' build-kafkasql
- name: Build and Push kafkasql image
env:
IMAGE_REPO: ttl.sh/${{ github.sha }}
# maximum allowed
IMAGE_TAG: 1d
run: make build-kafkasql-image push-kafkasql-image
integration-tests-sql:
name: Integration Tests SQL
runs-on: ubuntu-20.04
needs: prepare-sql-tests
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
- name: Setup Minikube
uses: manusa/[email protected]
with:
minikube version: 'v1.31.1'
kubernetes version: 'v1.26.3'
github token: ${{ secrets.GITHUB_TOKEN }}
driver: docker
- name: Prepare minikube tunnel
run: minikube tunnel &> /dev/null &
- name: Run Integration Tests - sql
run: make REGISTRY_IMAGE='-Dregistry-sql-image=ttl.sh/${{ github.sha }}/apicurio/apicurio-registry-sql:1d' run-sql-integration-tests
- name: Run Integration Tests - sql - auth
run: make REGISTRY_IMAGE='-Dregistry-sql-image=ttl.sh/${{ github.sha }}/apicurio/apicurio-registry-sql:1d' run-sql-auth-tests
- name: Run Integration Tests - sql - migration
run: make REGISTRY_IMAGE='-Dregistry-sql-image=ttl.sh/${{ github.sha }}/apicurio/apicurio-registry-sql:1d' run-sql-migration-integration-tests
- name: Run Integration Tests - sql - db upgrade
run: make REGISTRY_IMAGE='-Dregistry-sql-image=ttl.sh/${{ github.sha }}/apicurio/apicurio-registry-sql:1d' run-sql-upgrade-tests
- name: Run Integration Tests - sql - multitenancy
run: make REGISTRY_IMAGE='-Dregistry-sql-image=ttl.sh/${{ github.sha }}/apicurio/apicurio-registry-sql:1d' run-sql-multitenancy-integration-tests
- name: Collect logs
if: failure()
run: ./.github/scripts/collect_logs.sh
- name: Upload tests logs artifacts
if: failure()
uses: actions/[email protected]
with:
name: tests-logs
path: artifacts
integration-tests-kafkasql:
name: Integration Tests KafkaSql
runs-on: ubuntu-20.04
needs: prepare-kafkasql-tests
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
- name: Setup Minikube
uses: manusa/[email protected]
with:
minikube version: 'v1.31.1'
kubernetes version: 'v1.26.3'
github token: ${{ secrets.GITHUB_TOKEN }}
driver: docker
- name: Prepare minikube tunnel
run: minikube tunnel &> /dev/null &
- name: Run Integration Tests - KafkaSql
run: make REGISTRY_IMAGE='-Dregistry-kafkasql-image=ttl.sh/${{ github.sha }}/apicurio/apicurio-registry-kafkasql:1d' run-kafkasql-integration-tests
- name: Run Integration Tests - KafkaSql - Migration
run: make REGISTRY_IMAGE='-Dregistry-kafkasql-image=ttl.sh/${{ github.sha }}/apicurio/apicurio-registry-kafkasql:1d' run-kafkasql-migration-integration-tests
- name: Run Integration Tests - KafkaSql - DBUpgrade
run: make REGISTRY_IMAGE='-Dregistry-kafkasql-image=ttl.sh/${{ github.sha }}/apicurio/apicurio-registry-kafkasql:1d' run-kafkasql-upgrade-tests
- name: Run Integration Tests - KafkaSql - Manual
run: make REGISTRY_IMAGE='-Dregistry-kafkasql-image=ttl.sh/${{ github.sha }}/apicurio/apicurio-registry-kafkasql:1d' run-kafkasql-manual-tests
- name: Run Integration Tests - KafkaSql - Auth
run: make REGISTRY_IMAGE='-Dregistry-kafkasql-image=ttl.sh/${{ github.sha }}/apicurio/apicurio-registry-kafkasql:1d' run-kafkasql-auth-tests
- name: Collect logs
if: failure()
run: ./.github/scripts/collect_logs.sh
- name: Upload tests logs artifacts
if: failure()
uses: actions/[email protected]
with:
name: tests-logs
path: artifacts
integration-tests-ui:
name: Integration Tests UI
runs-on: ubuntu-20.04
needs: prepare-sql-tests
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
- name: Setup Minikube
uses: manusa/[email protected]
with:
minikube version: 'v1.31.1'
kubernetes version: 'v1.26.3'
github token: ${{ secrets.GITHUB_TOKEN }}
driver: docker
- name: Prepare minikube tunnel
run: minikube tunnel &> /dev/null &
- name: Run UI tests
run: make REGISTRY_IMAGE='-Dregistry-sql-image=ttl.sh/${{ github.sha }}/apicurio/apicurio-registry-sql:1d' run-ui-tests
- name: Collect logs
if: failure()
run: ./.github/scripts/collect_logs.sh
- name: Upload tests logs artifacts
if: failure()
uses: actions/[email protected]
with:
name: tests-logs
path: artifacts