Skip to content

Commit 6c9359f

Browse files
authored
[ISSUE apache#6824] Add golang e2e test (apache#6825)
* Update push-ci.yml, add golang test * Update pr-e2e-test.yml, add golang test
1 parent 4d82b30 commit 6c9359f

File tree

2 files changed

+170
-20
lines changed

2 files changed

+170
-20
lines changed

.github/workflows/pr-e2e-test.yml

+85-11
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ jobs:
103103
matrix:
104104
version: ${{ fromJSON(needs.list-version.outputs.version-json) }}
105105
steps:
106-
- uses: apache/rocketmq-test-tool@1a646589accad17070423eabf0f54925e52b0666
106+
- uses: apache/rocketmq-test-tool@7d84d276ad7755b1dc5cf9657a7a9bff6ae6d288
107107
name: Deploy rocketmq
108108
with:
109109
action: "deploy"
@@ -126,28 +126,27 @@ jobs:
126126
image:
127127
repository: ${{env.DOCKER_REPO}}
128128
tag: ${{ matrix.version }}
129-
130-
e2e-test:
129+
test-e2e-grpc-java:
131130
if: ${{ success() }}
132-
name: E2E Test
131+
name: Test E2E grpc java
133132
needs: [list-version, deploy]
134133
runs-on: ubuntu-latest
135134
timeout-minutes: 60
136135
strategy:
137136
matrix:
138137
version: ${{ fromJSON(needs.list-version.outputs.version-json) }}
139138
steps:
140-
- uses: apache/rocketmq-test-tool@1a646589accad17070423eabf0f54925e52b0666
139+
- uses: apache/rocketmq-test-tool@7d84d276ad7755b1dc5cf9657a7a9bff6ae6d288
141140
name: e2e test
142141
with:
143142
action: "test"
144143
ask-config: "${{ secrets.ASK_CONFIG_VIRGINA }}"
145144
test-version: "${{ matrix.version }}"
146-
test-code-git: "https://ghproxy.com/https://github.com/apache/rocketmq-e2e.git"
145+
test-code-git: "https://ghproxy.com/https://github.com/apache/rocketmq-e2e"
147146
test-code-branch: "master"
148147
test-code-path: java/e2e
149148
test-cmd: "mvn -B test"
150-
job-id: ${{ strategy.job-index }}
149+
job-id: 0
151150
- name: Publish Test Report
152151
uses: mikepenz/action-junit-report@v3
153152
if: always() # always run even if the previous step fails
@@ -160,24 +159,99 @@ jobs:
160159
if: always()
161160
name: Upload test log
162161
with:
163-
name: testlog.txt
162+
name: test-e2e-grpc-java-log.txt
163+
path: testlog.txt
164+
165+
test-e2e-golang:
166+
if: ${{ success() }}
167+
name: Test E2E golang
168+
needs: [list-version, deploy]
169+
runs-on: ubuntu-latest
170+
timeout-minutes: 60
171+
strategy:
172+
matrix:
173+
version: ${{ fromJSON(needs.list-version.outputs.version-json) }}
174+
steps:
175+
- uses: apache/rocketmq-test-tool@7d84d276ad7755b1dc5cf9657a7a9bff6ae6d288
176+
name: e2e test
177+
with:
178+
action: "test"
179+
ask-config: "${{ secrets.ASK_CONFIG_VIRGINA }}"
180+
test-version: "${{ matrix.version }}"
181+
test-code-git: "https://ghproxy.com/https://github.com/apache/rocketmq-e2e"
182+
test-code-branch: "master"
183+
test-code-path: golang
184+
test-cmd: |
185+
cd ../common && mvn -Prelease -DskipTests clean package -U
186+
cd ../rocketmq-admintools && source bin/env.sh
187+
cd ../golang && go get -u github.com/apache/rocketmq-clients/golang && gotestsum --junitfile ./target/surefire-reports/TEST-report.xml ./mqgotest/... -timeout 2m -v
188+
job-id: 0
189+
- name: Publish Test Report
190+
uses: mikepenz/action-junit-report@v3
191+
if: always() # always run even if the previous step fails
192+
with:
193+
report_paths: '**/test_report/TEST-*.xml'
194+
annotate_only: true
195+
include_passed: true
196+
detailed_summary: true
197+
- uses: actions/upload-artifact@v3
198+
if: always()
199+
name: Upload test log
200+
with:
201+
name: test-e2e-golang-log.txt
202+
path: testlog.txt
203+
204+
test-e2e-remoting-java:
205+
if: ${{ success() }}
206+
name: Test E2E remoting java
207+
needs: [ list-version, deploy ]
208+
runs-on: ubuntu-latest
209+
timeout-minutes: 60
210+
strategy:
211+
matrix:
212+
version: ${{ fromJSON(needs.list-version.outputs.version-json) }}
213+
steps:
214+
- uses: apache/rocketmq-test-tool@7d84d276ad7755b1dc5cf9657a7a9bff6ae6d288
215+
name: e2e test
216+
with:
217+
action: "test"
218+
ask-config: "${{ secrets.ASK_CONFIG_VIRGINA }}"
219+
test-version: "${{ matrix.version }}"
220+
test-code-git: "https://ghproxy.com/https://github.com/apache/rocketmq-e2e"
221+
test-code-branch: "master"
222+
test-code-path: java/e2e-v4
223+
test-cmd: "mvn -B test"
224+
job-id: 0
225+
- name: Publish Test Report
226+
uses: mikepenz/action-junit-report@v3
227+
if: always() # always run even if the previous step fails
228+
with:
229+
report_paths: '**/test_report/TEST-*.xml'
230+
annotate_only: true
231+
include_passed: true
232+
detailed_summary: true
233+
- uses: actions/upload-artifact@v3
234+
if: always()
235+
name: Upload test log
236+
with:
237+
name: test-e2e-remoting-java-log.txt
164238
path: testlog.txt
165-
166239

167240
clean:
168241
if: always()
169242
name: Clean
170-
needs: [list-version, e2e-test]
243+
needs: [list-version, test-e2e-grpc-java, test-e2e-golang, test-e2e-remoting-java]
171244
runs-on: ubuntu-latest
172245
timeout-minutes: 60
173246
strategy:
174247
matrix:
175248
version: ${{ fromJSON(needs.list-version.outputs.version-json) }}
176249
steps:
177-
- uses: apache/rocketmq-test-tool@1a646589accad17070423eabf0f54925e52b0666
250+
- uses: apache/rocketmq-test-tool@7d84d276ad7755b1dc5cf9657a7a9bff6ae6d288
178251
name: clean
179252
with:
180253
action: "clean"
181254
ask-config: "${{ secrets.ASK_CONFIG_VIRGINA }}"
182255
test-version: "${{ matrix.version }}"
183256
job-id: ${{ strategy.job-index }}
257+

.github/workflows/push-ci.yml

+85-9
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ jobs:
108108
matrix:
109109
version: ${{ fromJSON(needs.list-version.outputs.version-json) }}
110110
steps:
111-
- uses: apache/rocketmq-test-tool@1a646589accad17070423eabf0f54925e52b0666
111+
- uses: apache/rocketmq-test-tool@7d84d276ad7755b1dc5cf9657a7a9bff6ae6d288
112112
name: Deploy rocketmq
113113
with:
114114
action: "deploy"
@@ -131,27 +131,102 @@ jobs:
131131
image:
132132
repository: ${{env.DOCKER_REPO}}
133133
tag: ${{ matrix.version }}
134-
e2e-test:
134+
test-e2e-grpc-java:
135135
if: ${{ success() }}
136-
name: E2E Test
136+
name: Test E2E grpc java
137137
needs: [list-version, deploy]
138138
runs-on: ubuntu-latest
139139
timeout-minutes: 60
140140
strategy:
141141
matrix:
142142
version: ${{ fromJSON(needs.list-version.outputs.version-json) }}
143143
steps:
144-
- uses: apache/rocketmq-test-tool@1a646589accad17070423eabf0f54925e52b0666
144+
- uses: apache/rocketmq-test-tool@7d84d276ad7755b1dc5cf9657a7a9bff6ae6d288
145145
name: e2e test
146146
with:
147147
action: "test"
148148
ask-config: "${{ secrets.ASK_CONFIG_VIRGINA }}"
149149
test-version: "${{ matrix.version }}"
150-
test-code-git: "https://ghproxy.com/https://github.com/apache/rocketmq-e2e.git"
150+
test-code-git: "https://ghproxy.com/https://github.com/apache/rocketmq-e2e"
151151
test-code-branch: "master"
152152
test-code-path: java/e2e
153153
test-cmd: "mvn -B test"
154-
job-id: ${{ strategy.job-index }}
154+
job-id: 0
155+
- name: Publish Test Report
156+
uses: mikepenz/action-junit-report@v3
157+
if: always() # always run even if the previous step fails
158+
with:
159+
report_paths: '**/test_report/TEST-*.xml'
160+
annotate_only: true
161+
include_passed: true
162+
detailed_summary: true
163+
- uses: actions/upload-artifact@v3
164+
if: always()
165+
name: Upload test log
166+
with:
167+
name: test-e2e-grpc-java-log.txt
168+
path: testlog.txt
169+
170+
test-e2e-golang:
171+
if: ${{ success() }}
172+
name: Test E2E golang
173+
needs: [list-version, deploy]
174+
runs-on: ubuntu-latest
175+
timeout-minutes: 60
176+
strategy:
177+
matrix:
178+
version: ${{ fromJSON(needs.list-version.outputs.version-json) }}
179+
steps:
180+
- uses: apache/rocketmq-test-tool@7d84d276ad7755b1dc5cf9657a7a9bff6ae6d288
181+
name: e2e test
182+
with:
183+
action: "test"
184+
ask-config: "${{ secrets.ASK_CONFIG_VIRGINA }}"
185+
test-version: "${{ matrix.version }}"
186+
test-code-git: "https://ghproxy.com/https://github.com/apache/rocketmq-e2e"
187+
test-code-branch: "master"
188+
test-code-path: golang
189+
test-cmd: |
190+
cd ../common && mvn -Prelease -DskipTests clean package -U
191+
cd ../rocketmq-admintools && source bin/env.sh
192+
cd ../golang && go get -u github.com/apache/rocketmq-clients/golang && gotestsum --junitfile ./target/surefire-reports/TEST-report.xml ./mqgotest/... -timeout 2m -v
193+
job-id: 0
194+
- name: Publish Test Report
195+
uses: mikepenz/action-junit-report@v3
196+
if: always() # always run even if the previous step fails
197+
with:
198+
report_paths: '**/test_report/TEST-*.xml'
199+
annotate_only: true
200+
include_passed: true
201+
detailed_summary: true
202+
- uses: actions/upload-artifact@v3
203+
if: always()
204+
name: Upload test log
205+
with:
206+
name: test-e2e-golang-log.txt
207+
path: testlog.txt
208+
209+
test-e2e-remoting-java:
210+
if: ${{ success() }}
211+
name: Test E2E remoting java
212+
needs: [ list-version, deploy ]
213+
runs-on: ubuntu-latest
214+
timeout-minutes: 60
215+
strategy:
216+
matrix:
217+
version: ${{ fromJSON(needs.list-version.outputs.version-json) }}
218+
steps:
219+
- uses: apache/rocketmq-test-tool@7d84d276ad7755b1dc5cf9657a7a9bff6ae6d288
220+
name: e2e test
221+
with:
222+
action: "test"
223+
ask-config: "${{ secrets.ASK_CONFIG_VIRGINA }}"
224+
test-version: "${{ matrix.version }}"
225+
test-code-git: "https://ghproxy.com/https://github.com/apache/rocketmq-e2e"
226+
test-code-branch: "master"
227+
test-code-path: java/e2e-v4
228+
test-cmd: "mvn -B test"
229+
job-id: 0
155230
- name: Publish Test Report
156231
uses: mikepenz/action-junit-report@v3
157232
if: always() # always run even if the previous step fails
@@ -164,23 +239,24 @@ jobs:
164239
if: always()
165240
name: Upload test log
166241
with:
167-
name: testlog.txt
242+
name: test-e2e-remoting-java-log.txt
168243
path: testlog.txt
169244

170245
clean:
171246
if: always()
172247
name: Clean
173-
needs: [list-version, e2e-test]
248+
needs: [list-version, test-e2e-grpc-java, test-e2e-golang, test-e2e-remoting-java]
174249
runs-on: ubuntu-latest
175250
timeout-minutes: 60
176251
strategy:
177252
matrix:
178253
version: ${{ fromJSON(needs.list-version.outputs.version-json) }}
179254
steps:
180-
- uses: apache/rocketmq-test-tool@1a646589accad17070423eabf0f54925e52b0666
255+
- uses: apache/rocketmq-test-tool@7d84d276ad7755b1dc5cf9657a7a9bff6ae6d288
181256
name: clean
182257
with:
183258
action: "clean"
184259
ask-config: "${{ secrets.ASK_CONFIG_VIRGINA }}"
185260
test-version: "${{ matrix.version }}"
186261
job-id: ${{ strategy.job-index }}
262+

0 commit comments

Comments
 (0)