forked from sermant-io/Sermant
-
Notifications
You must be signed in to change notification settings - Fork 0
214 lines (214 loc) · 8.09 KB
/
mq_consume_prohibition_integration_test.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
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
name: mq-consume-prohibition integration test
env:
sermantVersion: 1.0.0
on:
push:
pull_request:
branches:
- '*'
paths:
- 'sermant-agentcore/**'
- 'sermant-integration-tests/mq-consume-prohibition-test/**'
- 'sermant-plugins/sermant-mq-consume-prohibition/**'
- '.github/workflows/mq_consume_prohibition_integration_test.yml'
- '.github/actions/common/mq-consume-prohibition/**'
- '.github/actions/scenarios/mq-consume-prohibition/**'
- '.github/actions/common/plugin-change-check/action.yml'
- '.github/actions/common/entry/action.yml'
- '.github/actions/common/exit/action.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.head_ref }}
cancel-in-progress: true
jobs:
set-execution-conditions:
name: set-execution-conditions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 100
- name: plugin-change-check
id: plugin-change-check
uses: ./.github/actions/common/plugin-change-check
- name: set-outputs
id: set-outputs
run: |
echo "enableKafkaConsumeProhibitionAction=${{env.enableKafkaConsumeProhibitionAction}}" >> $GITHUB_OUTPUT
echo "enableRocketmqConsumeProhibitionAction=${{env.enableRocketmqConsumeProhibitionAction}}" >> $GITHUB_OUTPUT
outputs:
enableKafkaConsumeProhibitionAction: ${{ steps.set-outputs.outputs.enableKafkaConsumeProhibitionAction }}
enableRocketmqConsumeProhibitionAction: ${{ steps.set-outputs.outputs.enableRocketmqConsumeProhibitionAction }}
download-midwares-and-cache:
name: download midwares and cache
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: cache zookeeper
uses: actions/cache@v3
with:
path: apache-zookeeper-3.6.3-bin.tar.gz
key: ${{ runner.os }}-apache-zookeeper-3.6.3
restore-keys: |
${{ runner.os }}-apache-zookeeper-3.6.3
- name: download zookeeper
run: |
export ROOT_PATH=$(pwd)
bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh zk
- name: cache rocketmq
uses: actions/cache@v3
with:
path: rocketmq-all-5.1.4-bin-release.zip
key: ${{ runner.os }}-rocketmq-all-5.1.4-bin-release
restore-keys: |
${{ runner.os }}-rocketmq-all-5.1.4-bin-release
- name: download rocketmq
run: |
export ROOT_PATH=$(pwd)
bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh rocketmq514
- name: cache kafka
uses: actions/cache@v3
with:
path: kafka_2.13-2.7.0.tgz
key: ${{ runner.os }}-kafka_2.13-2.7.0
restore-keys: |
${{ runner.os }}-kafka_2.13-2.7.0
- name: download kafka
run: |
export ROOT_PATH=$(pwd)
bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh kafka
build-agent-and-cache:
name: build agent and cache
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'adopt'
cache: maven
- name: cache agent
uses: actions/cache@v3
with:
path: sermant-agent-*/
key: ${{ runner.os }}-agent-${{ github.run_id }}
- name: package agent
run: |
sed -i '/sermant-backend/d' pom.xml
sed -i '/sermant-integration-tests/d' pom.xml
sed -i '/sermant-injector/d' pom.xml
mvn package -DskipTests -Ptest --file pom.xml
test-for-mq-consume-prohibition-kafka:
name: Test for mq-consume-prohibition kafka
runs-on: ubuntu-latest
if: needs.set-execution-conditions.outputs.enableKafkaConsumeProhibitionAction == 'true'
needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache]
strategy:
matrix:
include:
- kafkaVersion: "2.0.1"
- kafkaVersion: "2.1.1"
- kafkaVersion: "2.2.2"
- kafkaVersion: "2.3.1"
- kafkaVersion: "2.4.0"
- kafkaVersion: "2.5.1"
- kafkaVersion: "2.6.3"
- kafkaVersion: "2.7.2"
- kafkaVersion: "2.8.2"
- kafkaVersion: "3.0.2"
- kafkaVersion: "3.1.2"
- kafkaVersion: "3.2.2"
- kafkaVersion: "3.3.2"
- kafkaVersion: "3.4.1"
- kafkaVersion: "3.5.2"
- kafkaVersion: "3.6.1"
fail-fast: false
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 100
- name: set java version to environment
run: |
echo "javaVersion=8" >> $GITHUB_ENV
- name: common operations
uses: ./.github/actions/common/mq-consume-prohibition
- name: mq-consume-prohibition test for kafkaVersion=${{ matrix.kafkaVersion }}
uses: ./.github/actions/scenarios/mq-consume-prohibition/kafka
test-for-rocketmq-one-topic:
name: Test for rocketmq consumer with one topic
runs-on: ubuntu-latest
if: needs.set-execution-conditions.outputs.enableRocketmqConsumeProhibitionAction == 'true'
needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache]
strategy:
matrix:
include:
- rocketMqVersion: "4.6.1"
- rocketMqVersion: "4.7.1"
- rocketMqVersion: "4.8.0"
- rocketMqVersion: "4.9.7"
- rocketMqVersion: "5.0.0"
- rocketMqVersion: "5.1.4"
fail-fast: false
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 100
- name: set java version to environment
run: |
echo "javaVersion=8" >> $GITHUB_ENV
- name: common operations
uses: ./.github/actions/common/mq-consume-prohibition
- name: mq-consume-prohibition-rocketmq test for rocketMqVersion=${{ matrix.rocketMqVersion }}
uses: ./.github/actions/scenarios/mq-consume-prohibition/rocketmq/rocketmq-one-topic
test-for-rocketmq-two-topic:
name: Test for rocketmq consumer with two topic
runs-on: ubuntu-latest
if: needs.set-execution-conditions.outputs.enableRocketmqConsumeProhibitionAction == 'true'
needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache]
strategy:
matrix:
include:
- rocketMqVersion: "4.6.1"
- rocketMqVersion: "4.7.1"
- rocketMqVersion: "4.8.0"
- rocketMqVersion: "4.9.7"
- rocketMqVersion: "5.0.0"
- rocketMqVersion: "5.1.4"
fail-fast: false
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 100
- name: set java version to environment
run: |
echo "javaVersion=8" >> $GITHUB_ENV
- name: common operations
uses: ./.github/actions/common/mq-consume-prohibition
- name: mq-consume-prohibition test for rocketMqVersion=${{ matrix.rocketMqVersion }}
uses: ./.github/actions/scenarios/mq-consume-prohibition/rocketmq/rocketmq-two-topic
test-for-rocketmq-two-consumer:
name: Test for rocketmq consumer with two consumer
if: needs.set-execution-conditions.outputs.enableRocketmqConsumeProhibitionAction == 'true'
runs-on: ubuntu-latest
needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache]
strategy:
matrix:
include:
- rocketMqVersion: "4.6.1"
- rocketMqVersion: "4.7.1"
- rocketMqVersion: "4.8.0"
- rocketMqVersion: "4.9.7"
- rocketMqVersion: "5.0.0"
- rocketMqVersion: "5.1.4"
fail-fast: false
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 100
- name: set java version to environment
run: |
echo "javaVersion=8" >> $GITHUB_ENV
- name: common operations
uses: ./.github/actions/common/mq-consume-prohibition
- name: mq-consume-prohibition test for rocketMqVersion=${{ matrix.rocketMqVersion }}
uses: ./.github/actions/scenarios/mq-consume-prohibition/rocketmq/rocketmq-two-consumer