-
Notifications
You must be signed in to change notification settings - Fork 18
944 lines (899 loc) · 36.7 KB
/
server_compatibility.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
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
name: Test Server Backwards Compatibility
on:
workflow_dispatch:
inputs:
organization_name:
description: Name of the organization to build JARs from. If you want to run the tests with the JARs from your fork, set this to your username.
required: true
default: hazelcast
branch_name:
description: Name of the branch to build JARs from
required: true
default: master
hz_version:
description: Version of the JARs that will be built, without the SNAPSHOT suffix.
required: true
default: "5.0"
run_python:
description: Whether or not to run Python client tests. Set to something else to not run the tests.
required: true
default: run
run_nodejs:
description: Whether or not to run Node.js client tests (not supported client). Set to "run" to run the tests.
required: true
default: dontrun
run_cpp:
description: Whether or not to run CPP client tests (not supported client). Set to "run" to run the tests.
required: true
default: dontrun
run_csharp:
description: Whether or not to run Csharp client tests. Set to something else to not run the tests.
required: true
default: run
run_go:
description: Whether or not to run Go client tests (not supported client). Set to "run" to run the tests.
required: true
default: dontrun
run_java:
description: Whether or not to run Java Thin client tests. Set to something else to not run the tests.
required: true
default: run
jobs:
upload_jars:
name: Create and upload JARs
runs-on: ubuntu-latest
outputs:
hz_server_version: ${{ steps.set_up_hz_server_version.outputs.HAZELCAST_SERVER_VERSION }}
steps:
- name: Checkout to scripts
uses: actions/checkout@v4
with:
path: master
- name: Read Java Config
run: cat ${{ github.workspace }}/master/.github/java-config.env >> $GITHUB_ENV
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRIBUTION }}
- name: Checkout to test artifacts
uses: actions/checkout@v4
with:
repository: hazelcast/private-test-artifacts
path: certs
ref: data
token: ${{ secrets.GH_PAT }}
- name: Checkout to Hazelcast Mono ${{ github.event.inputs.branch_name }}
uses: actions/checkout@v4
with:
repository: ${{ github.event.inputs.organization_name }}/hazelcast-mono
path: hazelcast-mono
ref: ${{ github.event.inputs.branch_name }}
token: ${{ secrets.GH_PAT }}
- name: Set up HAZELCAST_SERVER_VERSION output variable
id: set_up_hz_server_version
run: echo "HAZELCAST_SERVER_VERSION=$( mvn help:evaluate -Dexpression=project.version -q -DforceStdout )" >> "$GITHUB_OUTPUT"
working-directory: hazelcast-mono
- name: Build JARs Hazelcast Server Version ${{ steps.set_up_hz_server_version.outputs.HAZELCAST_SERVER_VERSION }}
run: ./mvnw clean install --activate-profiles quick
working-directory: hazelcast-mono
- name: Upload Hazelcast JAR
uses: actions/upload-artifact@v4
with:
name: hazelcast
path: hazelcast-mono/hazelcast/hazelcast/target/hazelcast-*[!s].jar
retention-days: 1
- name: Upload Hazelcast SQL JAR (if exists)
uses: actions/upload-artifact@v4
with:
name: hazelcast-sql
path: hazelcast-mono/hazelcast/hazelcast-sql/target/hazelcast-sql-*[!s].jar
if-no-files-found: ignore
retention-days: 1
- name: Upload Hazelcast tests JAR
uses: actions/upload-artifact@v4
with:
name: hazelcast-tests
path: hazelcast-mono/hazelcast/hazelcast/target/hazelcast-*-tests.jar
retention-days: 1
- name: Upload Hazelcast Enterprise JAR
uses: actions/upload-artifact@v4
with:
name: hazelcast-enterprise
path: hazelcast-mono/hazelcast-enterprise/target/hazelcast-enterprise-*[!s].jar
retention-days: 1
- name: Rename certs.jar as Hazelcast Enterprise tests JAR
run: |
HZ_TESTS_JAR_NAME=$(basename $(ls $GITHUB_WORKSPACE/hazelcast-mono/hazelcast/hazelcast/target/hazelcast-*-tests.jar))
HZ_ENTERPRISE_TESTS_JAR_NAME=$(echo $HZ_TESTS_JAR_NAME | sed "s/hazelcast/hazelcast-enterprise/")
mv certs.jar $HZ_ENTERPRISE_TESTS_JAR_NAME
working-directory: certs
- name: Upload certificates as Hazelcast Enterprise tests JAR
uses: actions/upload-artifact@v4
with:
name: hazelcast-enterprise-tests
path: certs/hazelcast-enterprise-*-tests.jar
retention-days: 1
setup_python_client_matrix:
name: Setup the Python client test matrix
if: ${{ github.event.inputs.run_python == 'run' }}
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Checkout to scripts
uses: actions/checkout@v4
- name: Set client matrix
id: set-matrix
run: echo "::set-output name=matrix::$( python get_client_matrix.py --client py --option tag --use-latest-patch-versions )"
test_python_clients:
needs: [ upload_jars, setup_python_client_matrix ]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
client_tag: ${{ fromJson(needs.setup_python_client_matrix.outputs.matrix) }}
server_kind: [ os, enterprise ]
name: Test Python client ${{ matrix.client_tag }} with ${{ matrix.server_kind }} server
steps:
- name: Set up enterprise license key
if: ${{ github.event.inputs.hz_version < '5.5' }}
run: |
echo "HAZELCAST_ENTERPRISE_KEY=${{ secrets.HAZELCAST_ENTERPRISE_KEY }}" >> $GITHUB_ENV
- name: Set up enterprise v7 license key
if: ${{ github.event.inputs.hz_version >= '5.5' }}
run: |
echo "HAZELCAST_ENTERPRISE_KEY=${{ secrets.HAZELCAST_ENTERPRISE_KEY_V7 }}" >> $GITHUB_ENV
- name: Checkout to scripts
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Read Java Config
run: cat ${{ github.workspace }}/.github/java-config.env >> $GITHUB_ENV
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRIBUTION }}
- name: Checkout to master
uses: actions/checkout@v4
with:
repository: hazelcast/hazelcast-python-client
path: master
ref: master
- name: Checkout to tag
uses: actions/checkout@v4
with:
repository: hazelcast/hazelcast-python-client
path: tag
ref: ${{ matrix.client_tag }}
- name: Copy the client code into master
run: |
rm -rf $GITHUB_WORKSPACE/master/hazelcast
cp -a $GITHUB_WORKSPACE/tag/hazelcast $GITHUB_WORKSPACE/master/hazelcast
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-test.txt
working-directory: master
- name: Download Hazelcast tests JAR
uses: actions/download-artifact@v4
with:
name: hazelcast-tests
path: jars
- name: Download Hazelcast SQL JAR (if exists)
continue-on-error: true
uses: actions/download-artifact@v4
with:
name: hazelcast-sql
path: jars
- name: Download Hazelcast JAR
if: ${{ matrix.server_kind == 'os' }}
uses: actions/download-artifact@v4
with:
name: hazelcast
path: jars
- name: Download Hazelcast Enterprise JAR
if: ${{ matrix.server_kind == 'enterprise' }}
uses: actions/download-artifact@v4
with:
name: hazelcast-enterprise
path: jars
- name: Download Hazelcast Enterprise tests JAR
if: ${{ matrix.server_kind == 'enterprise' }}
uses: actions/download-artifact@v4
with:
name: hazelcast-enterprise-tests
path: jars
- name: Start RC
env:
HAZELCAST_ENTERPRISE_KEY: ${{ env.HAZELCAST_ENTERPRISE_KEY }}
run: python start_rc.py --rc-version '0.8-SNAPSHOT' --jars jars --server-kind ${{ matrix.server_kind }} --use-simple-server
- name: Run non-enterprise tests
if: ${{ matrix.server_kind == 'os' }}
run: pytest -m 'not enterprise' tests/integration/backward_compatible
working-directory: master
- name: Run all tests
if: ${{ matrix.server_kind == 'enterprise' }}
run: pytest tests/integration/backward_compatible
working-directory: master
setup_nodejs_client_matrix:
name: Setup the Node.js client test matrix
if: ${{ github.event.inputs.run_nodejs == 'run' }}
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Checkout to scripts
uses: actions/checkout@v4
- name: Set client matrix
id: set-matrix
run: echo "::set-output name=matrix::$( python get_client_matrix.py --client node --option tag --use-latest-patch-versions )"
test_nodejs_clients:
needs: [ upload_jars, setup_nodejs_client_matrix ]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
client_tag: ${{ fromJson(needs.setup_nodejs_client_matrix.outputs.matrix) }}
server_kind: [ os, enterprise ]
name: Test Node.js client ${{ matrix.client_tag }} with ${{ matrix.server_kind }} server
steps:
- name: Set up enterprise license key
if: ${{ github.event.inputs.hz_version < '5.5' }}
run: |
echo "HAZELCAST_ENTERPRISE_KEY=${{ secrets.HAZELCAST_ENTERPRISE_KEY }}" >> $GITHUB_ENV
- name: Set up enterprise v7 license key
if: ${{ github.event.inputs.hz_version >= '5.5' }}
run: |
echo "HAZELCAST_ENTERPRISE_KEY=${{ secrets.HAZELCAST_ENTERPRISE_KEY_V7 }}" >> $GITHUB_ENV
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 14
- name: Read Java Config
run: cat ${{ github.workspace }}/.github/java-config.env >> $GITHUB_ENV
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRIBUTION }}
- name: Checkout to master
uses: actions/checkout@v4
with:
repository: hazelcast/hazelcast-nodejs-client
path: master
ref: master
- name: Checkout to tag
uses: actions/checkout@v4
with:
repository: hazelcast/hazelcast-nodejs-client
path: tag
ref: ${{ matrix.client_tag }}
- name: Install dependencies and compile client
run: |
npm install
npm run compile
working-directory: tag
- name: Install test dependencies
run: |
npm install
working-directory: master
- name: Copy client code into master
run: |
rm -rf $GITHUB_WORKSPACE/master/lib
rm $GITHUB_WORKSPACE/master/package.json
cp -a $GITHUB_WORKSPACE/tag/lib $GITHUB_WORKSPACE/master/lib
cp -a $GITHUB_WORKSPACE/tag/package.json $GITHUB_WORKSPACE/master/package.json
- name: Download Hazelcast tests JAR
uses: actions/download-artifact@v4
with:
name: hazelcast-tests
path: jars
- name: Download Hazelcast SQL JAR (if exists)
continue-on-error: true
uses: actions/download-artifact@v4
with:
name: hazelcast-sql
path: jars
- name: Download Hazelcast JAR
if: ${{ matrix.server_kind == 'os' }}
uses: actions/download-artifact@v4
with:
name: hazelcast
path: jars
- name: Download Hazelcast Enterprise JAR
if: ${{ matrix.server_kind == 'enterprise' }}
uses: actions/download-artifact@v4
with:
name: hazelcast-enterprise
path: jars
- name: Download Hazelcast Enterprise tests JAR
if: ${{ matrix.server_kind == 'enterprise' }}
uses: actions/download-artifact@v4
with:
name: hazelcast-enterprise-tests
path: jars
- name: Start RC
env:
HAZELCAST_ENTERPRISE_KEY: ${{ env.HAZELCAST_ENTERPRISE_KEY }}
run: python start_rc.py --rc-version '0.8-SNAPSHOT' --jars jars --server-kind ${{ matrix.server_kind }}
- name: Run non-enterprise tests
if: ${{ matrix.server_kind == 'os' }}
run: node node_modules/mocha/bin/mocha --recursive test/integration/backward_compatible
working-directory: master
- name: Run all tests
if: ${{ matrix.server_kind == 'enterprise' }}
run: node node_modules/mocha/bin/mocha --recursive test/integration/backward_compatible
working-directory: master
env:
HAZELCAST_ENTERPRISE_KEY: ${{ env.HAZELCAST_ENTERPRISE_KEY }}
setup_csharp_client_matrix:
name: Setup the Csharp client test matrix
if: ${{ github.event.inputs.run_csharp == 'run' }}
runs-on: windows-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Checkout to scripts
uses: actions/checkout@v4
- name: Set client matrix
id: set-matrix
run: echo "::set-output name=matrix::$( python get_client_matrix.py --client cs --option tag --use-latest-patch-versions )"
test_csharp_clients:
needs: [ upload_jars, setup_csharp_client_matrix ]
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
client_tag: ${{ fromJson(needs.setup_csharp_client_matrix.outputs.matrix) }}
server_kind: [ os, enterprise ]
name: Test Csharp client ${{ matrix.client_tag }} with ${{ matrix.server_kind }} server
steps:
- name: Set up enterprise license key
shell: pwsh
if: ${{ github.event.inputs.hz_version < '5.5' }}
run: |
"HAZELCAST_ENTERPRISE_KEY=${{ secrets.HAZELCAST_ENTERPRISE_KEY }}" >> $env:GITHUB_ENV
- name: Set up enterprise v7 license key
shell: pwsh
if: ${{ github.event.inputs.hz_version >= '5.5' }}
run: |
"HAZELCAST_ENTERPRISE_KEY=${{ secrets.HAZELCAST_ENTERPRISE_KEY_V7 }}" >> $env:GITHUB_ENV
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Read Java Config
uses: pietrobolcato/action-read-yaml@9f13718d61111b69f30ab4ac683e67a56d254e1d
id: java-config
with:
config: ${{ github.workspace }}/.github/java-config.yml
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: ${{ steps.java-config.outputs['java-version'] }}
distribution: ${{ steps.java-config.outputs['distribution'] }}
- name: Install .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
2.1.x
3.1.x
5.0.x
6.0.x
7.0.x
8.0.x
- name: Checkout to tag
uses: actions/checkout@v4
with:
repository: hazelcast/hazelcast-csharp-client
path: tag
ref: ${{ matrix.client_tag }}
- name: Checkout default branch
uses: actions/checkout@v4
with:
repository: hazelcast/hazelcast-csharp-client
path: hazelcast-csharp-client-master
sparse-checkout: |
hz.ps1
build/utils.ps1
sparse-checkout-cone-mode: false
- name: Download Hazelcast tests JAR
uses: actions/download-artifact@v4
with:
name: hazelcast-tests
path: tag/temp/lib
- name: Download Hazelcast SQL JAR (if exists)
continue-on-error: true
uses: actions/download-artifact@v4
with:
name: hazelcast-sql
path: tag/temp/lib
- name: Download Hazelcast JAR
if: ${{ matrix.server_kind == 'os' }}
uses: actions/download-artifact@v4
with:
name: hazelcast
path: tag/temp/lib
- name: Download Hazelcast Enterprise JAR
if: ${{ matrix.server_kind == 'enterprise' }}
uses: actions/download-artifact@v4
with:
name: hazelcast-enterprise
path: tag/temp/lib
- name: Download Hazelcast Enterprise tests JAR
if: ${{ matrix.server_kind == 'enterprise' }}
uses: actions/download-artifact@v4
with:
name: hazelcast-enterprise-tests
path: tag/temp/lib
- name: Update submodules
run: |
git submodule update --init
working-directory: tag
- name: Detect Client Version
shell: pwsh
run: |
$client = "${{matrix.client_tag}}".replace("v","")
"CLIENT_VERSION=$client" >> $env:GITHUB_ENV
- uses: madhead/semver-utils@latest
id: version
with:
version: ${{ env.CLIENT_VERSION }}
compare-to: 5.2.x
satisfies: x
- name: Client Version
run: |
echo "${{steps.version.outputs.major}}.${{steps.version.outputs.minor }}.${{steps.version.outputs.patch }}"
- name: Copy latest build scripts to local workspace
shell: pwsh
run: |
# This is only currently required for <5.5.0 clients, where the location of the OS SNAPSHOT repo needs to be provided
# However, for consistency they should always be used and therefore must be kept in sync, as there are guaranteed to be further future breaking changes
cp hazelcast-csharp-client-master\hz.ps1 ${{github.workspace}}\tag\hz.ps1
cp hazelcast-csharp-client-master\build\utils.ps1 ${{github.workspace}}\tag\build\utils.ps1
- name: Backport SSL Tests
id: backport-tests
if: ${{ ((steps.version.outputs.major == '5' && steps.version.outputs.minor < '3') || (steps.version.outputs.major == '4')) }}
shell: pwsh
working-directory: tag
run: |
./hz.ps1 copy-files -copy-files-source ${{github.workspace}}\utils\net\ssl
- name: Upgrade NUnit Adapter in Testing if Client v5.2.2 or v5.3.1
id: upgrade-nunit-adapter
if: ${{ ((steps.version.outputs.major == '5' && steps.version.outputs.minor == '3' && steps.version.outputs.patch == '1') || (steps.version.outputs.major == '5' && steps.version.outputs.minor == '2' && steps.version.outputs.patch == '2')) }}
working-directory: tag
run: |
sed -i 's/<PackageReference Include="NUnit3TestAdapter" Version="4.3.1">/<PackageReference Include="NUnit3TestAdapter" Version="4.5.0">/g' src/Hazelcast.Net.Tests/Hazelcast.Net.Tests.csproj
- name: Build
shell: pwsh
working-directory: tag
run: |
./hz.ps1 clean, build
- name: Build Client 4.0.2 with compatibility
if: ${{ steps.version.outputs.major == '4' && steps.version.outputs.minor == '0' }}
shell: pwsh
working-directory: tag
run: |
./hz.ps1 clean, build
- name: Run non-enterprise tests
if: ${{ matrix.server_kind == 'os' && steps.backport-tests.outcome == 'skipped' }}
shell: pwsh
run: |
./hz.ps1 test -tf "method != SendReceive and namespace !~ Hazelcast.Tests.CP" -server ${{ github.event.inputs.hz_version }}-SNAPSHOT
working-directory: tag
env:
HAZELCAST_SERVER_VERSION: ${{ github.event.inputs.hz_version }}
HZ_SNAPSHOT_INTERNAL_USERNAME: ${{ secrets.HZ_SNAPSHOT_INTERNAL_USERNAME }}
HZ_SNAPSHOT_INTERNAL_PASSWORD: ${{ secrets.HZ_SNAPSHOT_INTERNAL_PASSWORD }}
- name: Run non-enterprise tests with compatibility
if: ${{ matrix.server_kind == 'os' && steps.backport-tests.outcome == 'success' }}
shell: pwsh
run: |
./hz.ps1 test -tf "method != SendReceive and namespace !~ Hazelcast.Tests.CP" -server ${{ github.event.inputs.hz_version }}-SNAPSHOT
working-directory: tag
env:
HAZELCAST_SERVER_VERSION: ${{ github.event.inputs.hz_version }}
HZ_SNAPSHOT_INTERNAL_USERNAME: ${{ secrets.HZ_SNAPSHOT_INTERNAL_USERNAME }}
HZ_SNAPSHOT_INTERNAL_PASSWORD: ${{ secrets.HZ_SNAPSHOT_INTERNAL_PASSWORD }}
- name: Run all tests
if: ${{ matrix.server_kind == 'enterprise' && steps.backport-tests.outcome == 'skipped' }}
shell: pwsh
run: |
./hz.ps1 -enterprise -tf "method != SendReceive" -server ${{ github.event.inputs.hz_version }}-SNAPSHOT test ${{ secrets.GH_PAT }}
working-directory: tag
env:
HAZELCAST_ENTERPRISE_KEY: ${{ env.HAZELCAST_ENTERPRISE_KEY }}
HAZELCAST_SERVER_VERSION: ${{ github.event.inputs.hz_version }}
HZ_SNAPSHOT_INTERNAL_USERNAME: ${{ secrets.HZ_SNAPSHOT_INTERNAL_USERNAME }}
HZ_SNAPSHOT_INTERNAL_PASSWORD: ${{ secrets.HZ_SNAPSHOT_INTERNAL_PASSWORD }}
- name: Run all tests with compatibility
if: ${{matrix.server_kind == 'enterprise' && steps.backport-tests.outcome == 'success'}}
shell: pwsh
run: |
./hz.ps1 -enterprise -tf "method != SendReceive" -server ${{ github.event.inputs.hz_version }}-SNAPSHOT test ${{ secrets.GH_PAT }}
working-directory: tag
env:
HAZELCAST_ENTERPRISE_KEY: ${{ env.HAZELCAST_ENTERPRISE_KEY }}
HAZELCAST_SERVER_VERSION: ${{ github.event.inputs.hz_version }}
HZ_SNAPSHOT_INTERNAL_USERNAME: ${{ secrets.HZ_SNAPSHOT_INTERNAL_USERNAME }}
HZ_SNAPSHOT_INTERNAL_PASSWORD: ${{ secrets.HZ_SNAPSHOT_INTERNAL_PASSWORD }}
# upload logs
- name: Upload RC and Server logs
uses: actions/upload-artifact@v4
if: always()
with:
name: Rc-Server-logs-${{ matrix.client_tag }}-${{ matrix.server_kind }}
path: '${{github.workspace}}\tag\temp\rc\' # entire directory
setup_cpp_client_matrix:
name: Setup the Cpp client test matrix
if: ${{ github.event.inputs.run_cpp == 'run' }}
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Checkout to scripts
uses: actions/checkout@v4
- name: Set client matrix
id: set-matrix
run: echo "::set-output name=matrix::$( python get_client_matrix.py --client cpp --option tag --use-latest-patch-versions )"
test_cpp_clients:
needs: [ upload_jars, setup_cpp_client_matrix ]
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
client_tag: ${{ fromJson(needs.setup_cpp_client_matrix.outputs.matrix) }}
server_kind: [ enterprise ] #TODO When tests are divided as OS, ENTERPRISE, OS matrix will be added
name: Test CPP client ${{ matrix.client_tag }} with ${{ matrix.server_kind }} server
steps:
- name: Set up enterprise license key
if: ${{ github.event.inputs.hz_version < '5.5' }}
run: |
echo "HAZELCAST_ENTERPRISE_KEY=${{ secrets.HAZELCAST_ENTERPRISE_KEY }}" >> $GITHUB_ENV
- name: Set up enterprise v7 license key
if: ${{ github.event.inputs.hz_version >= '5.5' }}
run: |
echo "HAZELCAST_ENTERPRISE_KEY=${{ secrets.HAZELCAST_ENTERPRISE_KEY_V7 }}" >> $GITHUB_ENV
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Read Java Config
run: cat ${{ github.workspace }}/.github/java-config.env >> $GITHUB_ENV
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRIBUTION }}
- name: Checkout master
uses: actions/checkout@v4
with:
repository: hazelcast/hazelcast-cpp-client
path: master
- name: Checkout to tag
uses: actions/checkout@v4
with:
repository: hazelcast/hazelcast-cpp-client
path: tag
ref: ${{ matrix.client_tag }}
- name: Delete old scripts and get new ones
run: |
rm -rf tag/scripts
cp -R master/scripts tag/
- name: Install Necessary Packages
run: |
sudo apt-get update
sudo apt-get install -y net-tools libssl-dev gdb
working-directory: tag
- name: Install Boost
run: |
sudo ./scripts/install-boost.sh 1.76.0
working-directory: tag
- name: Install Thrift
run: |
sudo ./scripts/install-thrift.sh 0.13.0
working-directory: tag
- name: Download Hazelcast tests JAR
uses: actions/download-artifact@v4
with:
name: hazelcast-tests
path: tag
- name: Download Hazelcast SQL JAR (if exists)
continue-on-error: true
uses: actions/download-artifact@v4
with:
name: hazelcast-sql
path: tag
- name: Download Hazelcast JAR
if: ${{ matrix.server_kind == 'os' }}
uses: actions/download-artifact@v4
with:
name: hazelcast
path: tag
- name: Download Hazelcast Enterprise JAR
if: ${{ matrix.server_kind == 'enterprise' }}
uses: actions/download-artifact@v4
with:
name: hazelcast-enterprise
path: tag
- name: Download Hazelcast Enterprise tests JAR
if: ${{ matrix.server_kind == 'enterprise' }}
uses: actions/download-artifact@v4
with:
name: hazelcast-enterprise-tests
path: tag
- name: Build & Install
env:
BUILD_DIR: build
run: |
./scripts/build-unix.sh \
-DCMAKE_BUILD_TYPE=Debug \
-DBUILD_SHARED_LIBS=ON \
-DWITH_OPENSSL=ON \
-DBUILD_TESTS=ON \
-DBUILD_EXAMPLES=OFF
working-directory: tag
- name: Test
env:
BUILD_DIR: build
HAZELCAST_ENTERPRISE_KEY: ${{ env.HAZELCAST_ENTERPRISE_KEY }}
GTEST_FILTER: -*Aws*:*DescribeInstancesTest*
HZ_VERSION: '${{ github.event.inputs.hz_version }}-SNAPSHOT'
run: |
ulimit -c unlimited
sudo sh -c "echo 'core' > /proc/sys/kernel/core_pattern"
sudo sh -c "echo '1' > /proc/sys/kernel/core_uses_pid"
./scripts/test-unix.sh
working-directory: tag
setup_go_client_matrix:
name: Setup the Go client test matrix
if: ${{ github.event.inputs.run_go == 'run' }}
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Checkout to scripts
uses: actions/checkout@v4
- name: Set client matrix
id: set-matrix
run: echo "::set-output name=matrix::$( python get_client_matrix.py --client go --option tag --use-latest-patch-versions )"
test_go_client:
needs: [upload_jars, setup_go_client_matrix]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
client_tag: ${{ fromJson(needs.setup_go_client_matrix.outputs.matrix) }}
name: Test Go client ${{ matrix.client_tag }} with enterprise server on ubuntu-latest
steps:
- name: Set up enterprise license key
if: ${{ github.event.inputs.hz_version < '5.5' }}
run: |
echo "HAZELCAST_ENTERPRISE_KEY=${{ secrets.HAZELCAST_ENTERPRISE_KEY }}" >> $GITHUB_ENV
- name: Set up enterprise v7 license key
if: ${{ github.event.inputs.hz_version >= '5.5' }}
run: |
echo "HAZELCAST_ENTERPRISE_KEY=${{ secrets.HAZELCAST_ENTERPRISE_KEY_V7 }}" >> $GITHUB_ENV
- uses: actions/checkout@v4
- name: Read Java Config
run: cat ${{ github.workspace }}/.github/java-config.env >> $GITHUB_ENV
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRIBUTION }}
- name: Checkout the ${{ matrix.client_tag }}
uses: actions/checkout@v4
with:
repository: hazelcast/hazelcast-go-client
path: client
ref: ${{ matrix.client_tag }}
- name: Download Hazelcast tests JAR
uses: actions/download-artifact@v4
with:
name: hazelcast-tests
path: client
- name: Download Hazelcast JAR
uses: actions/download-artifact@v4
with:
name: hazelcast
path: client
- name: Download Hazelcast SQL JAR (if exists)
continue-on-error: true
uses: actions/download-artifact@v4
with:
name: hazelcast-sql
path: client
- name: Download Hazelcast Enterprise JAR
uses: actions/download-artifact@v4
with:
name: hazelcast-enterprise
path: client
- name: Download Hazelcast Enterprise tests JAR
uses: actions/download-artifact@v4
with:
name: hazelcast-enterprise-tests
path: client
- name: Test
env:
HAZELCAST_ENTERPRISE_KEY: ${{ env.HAZELCAST_ENTERPRISE_KEY }}
HZ_VERSION: '${{ github.event.inputs.hz_version }}-SNAPSHOT'
SSL_ENABLED: 1
run: |
./rc.sh start
make test-all
working-directory: client
setup_java_client_matrix:
name: Setup the Java Thin client test matrix
if: ${{ github.event.inputs.run_java == 'run' }}
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Checkout to scripts
uses: actions/checkout@v4
- name: Set client matrix
id: set-matrix
#run: echo "matrix=$( python get_client_matrix.py --client java --option tag --use-latest-patch-versions )" >> "$GITHUB_OUTPUT"
run: echo 'matrix=["v5.5.0"]' >> "$GITHUB_OUTPUT"
test_java_client:
needs: [ upload_jars, setup_java_client_matrix ]
runs-on: ubicloud-standard-8
strategy:
fail-fast: false
matrix:
client_tag: ${{ fromJson(needs.setup_java_client_matrix.outputs.matrix) }}
server_kind: [ os, enterprise ]
tests_type: [ os, enterprise ]
exclude:
- server_kind: os
tests_type: enterprise
name: Test Java client (standalone) ${{ matrix.client_tag }} branch running ${{ matrix.tests_type }} tests against ${{ matrix.server_kind }} server
steps:
- name: Set up enterprise license key
if: ${{ github.event.inputs.hz_version < '5.5' }}
run: |
echo "HAZELCAST_ENTERPRISE_KEY=${{ secrets.HAZELCAST_ENTERPRISE_KEY }}" >> $GITHUB_ENV
- name: Set up enterprise v7 license key
if: ${{ github.event.inputs.hz_version >= '5.5' }}
run: |
echo "HAZELCAST_ENTERPRISE_KEY=${{ secrets.HAZELCAST_ENTERPRISE_KEY_V7 }}" >> $GITHUB_ENV
- uses: actions/checkout@v4
- name: Read Java Config
run: cat ${{ github.workspace }}/.github/java-config.env >> $GITHUB_ENV
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRIBUTION }}
- name: Checkout to ${{ matrix.client_tag }}
uses: actions/checkout@v4
with:
repository: ${{ github.event.inputs.organization_name }}/hazelcast-java-client
token: ${{ secrets.GH_PAT }}
path: java-client
ref: ${{ matrix.client_tag }}
- name: Setup Local Maven Cache
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Remove ${{ needs.upload_jars.outputs.hz_server_version }} dir from Local Maven Cache
run: |
rm -rf ~/.m2/repository/com/hazelcast/hazelcast/${{ needs.upload_jars.outputs.hz_server_version }}
rm -rf ~/.m2/repository/com/hazelcast/hazelcast-enterprise/${{ needs.upload_jars.outputs.hz_server_version }}
- name: Download Hazelcast JAR
uses: actions/download-artifact@v4
with:
name: hazelcast
path: hazelcast-server-jars
- name: Download Hazelcast tests JAR
uses: actions/download-artifact@v4
with:
name: hazelcast-tests
path: hazelcast-server-jars
- name: Download Hazelcast Enterprise JAR
uses: actions/download-artifact@v4
with:
name: hazelcast-enterprise
path: hazelcast-server-jars
- name: Install Hazelcast JAR to maven local
run: |
mvn -B install:install-file\
-Dfile=hazelcast-server-jars/hazelcast-${{ needs.upload_jars.outputs.hz_server_version }}.jar\
-DgroupId=com.hazelcast\
-DartifactId=hazelcast\
-Dversion=${{ needs.upload_jars.outputs.hz_server_version }}\
-Dpackaging=jar\
-DgeneratePom=true
- name: Install Hazelcast tests JAR to maven local
run: |
mvn -B install:install-file\
-Dfile=hazelcast-server-jars/hazelcast-${{ needs.upload_jars.outputs.hz_server_version }}-tests.jar\
-DgroupId=com.hazelcast\
-DartifactId=hazelcast\
-Dversion=${{ needs.upload_jars.outputs.hz_server_version }}\
-Dclassifier=tests\
-Dpackaging=jar\
-DgeneratePom=true
- name: Install Hazelcast Enterprise JAR to maven local
run: |
mvn -B install:install-file\
-Dfile=hazelcast-server-jars/hazelcast-enterprise-${{ needs.upload_jars.outputs.hz_server_version }}.jar\
-DgroupId=com.hazelcast\
-DartifactId=hazelcast-enterprise\
-Dversion=${{ needs.upload_jars.outputs.hz_server_version }}\
-Dpackaging=jar\
-DgeneratePom=true
- name: Set up HZ_LICENSEKEY env
if: ${{ matrix.server_kind == 'enterprise' && needs.upload_jars.outputs.hz_server_version < '5.5' }}
run: |
echo "HZ_LICENSEKEY=${{ secrets.HAZELCAST_ENTERPRISE_KEY }}" >> $GITHUB_ENV
- name: Set up v7 HZ_LICENSEKEY env
if: ${{ matrix.server_kind == 'enterprise' && needs.upload_jars.outputs.hz_server_version >= '5.5' }}
run: |
echo "HZ_LICENSEKEY=${{ secrets.HAZELCAST_ENTERPRISE_KEY_V7 }}" >> $GITHUB_ENV
- name: Build modules
shell: bash -l {0}
run: |
chmod +x mvnw
./mvnw -B -V -e clean install -DskipTests
working-directory: client
- name: Run non-enterprise tests
if: ${{ matrix.tests_type == 'os' }}
shell: bash -l {0}
run: |
chmod +x mvnw
./mvnw -B -V -e test -Pintegration-tests -Pcode-coverage -Djdk.version=${{ env.JAVA_VERSION }} -Dtest.hazelcast-server.version=${{ needs.upload_jars.outputs.hz_server_version }}
working-directory: java-client/hazelcast-java-client
- name: Run enterprise Vector tests
if: ${{ matrix.server_kind == 'enterprise' && matrix.tests_type == 'enterprise' }}
shell: bash -l {0}
run: |
chmod +x mvnw
./mvnw -B -V -e test -Pintegration-tests -Pcode-coverage -Djdk.version=${{ env.JAVA_VERSION }} -Dtest.hazelcast-server.version=${{ needs.upload_jars.outputs.hz_server_version }}
working-directory: client/hazelcast-enterprise-java-client-vector
- name: Run enterprise tests
if: ${{ matrix.server_kind == 'enterprise' && matrix.tests_type == 'enterprise' }}
shell: bash -l {0}
run: |
chmod +x mvnw
./mvnw -B -V -e test -Pintegration-tests -Pcode-coverage -Djdk.version=${{ env.JAVA_VERSION }} -Dtest.hazelcast-server.version=${{ needs.upload_jars.outputs.hz_server_version }}
working-directory: java-client/hazelcast-enterprise-java-client