@@ -228,7 +228,7 @@ jobs:
228
228
run :
npm install [email protected]
229
229
230
230
- name : Run TestCafe Tests
231
- run : npx testcafe "firefox :headless" web-app/tests/subpath-nginx/ -q --skip-js-errors -c 3
231
+ run : npx testcafe "chrome :headless" web-app/tests/subpath-nginx/ -q --skip-js-errors -c 3
232
232
233
233
- name : Clean up docker
234
234
if : always()
@@ -282,7 +282,7 @@ jobs:
282
282
run :
npm install [email protected]
283
283
284
284
- name : Run TestCafe Tests
285
- run : npx testcafe "firefox :headless" web-app/tests/permissions-1/ -q --skip-js-errors -c 3
285
+ run : npx testcafe "chrome :headless" web-app/tests/permissions-1/ -q --skip-js-errors -c 3
286
286
287
287
- name : Clean up users & policies
288
288
run : |
@@ -334,7 +334,7 @@ jobs:
334
334
run :
npm install [email protected]
335
335
336
336
- name : Run TestCafe Tests
337
- run : npx testcafe "firefox :headless" web-app/tests/permissions-2/ -q --skip-js-errors -c 3
337
+ run : npx testcafe "chrome :headless" web-app/tests/permissions-2/ -q --skip-js-errors -c 3
338
338
339
339
- name : Clean up users & policies
340
340
run : |
@@ -386,7 +386,7 @@ jobs:
386
386
run :
npm install [email protected]
387
387
388
388
- name : Run TestCafe Tests
389
- run : npx testcafe "firefox :headless" web-app/tests/permissions-3/ -q --skip-js-errors -c 3
389
+ run : npx testcafe "chrome :headless" web-app/tests/permissions-3/ -q --skip-js-errors -c 3
390
390
391
391
- name : Clean up users & policies
392
392
run : |
@@ -439,7 +439,7 @@ jobs:
439
439
440
440
- name : Run TestCafe Tests
441
441
timeout-minutes : 10
442
- run : npx testcafe "firefox :headless" web-app/tests/permissions-4/ --skip-js-errors
442
+ run : npx testcafe "chrome :headless" web-app/tests/permissions-4/ --skip-js-errors
443
443
444
444
all-permissions-5 :
445
445
name : Permissions Tests Part 5
@@ -487,7 +487,7 @@ jobs:
487
487
488
488
- name : Run TestCafe Tests
489
489
timeout-minutes : 5
490
- run : npx testcafe "firefox :headless" web-app/tests/permissions-5/ --skip-js-errors
490
+ run : npx testcafe "chrome :headless" web-app/tests/permissions-5/ --skip-js-errors
491
491
492
492
all-permissions-6 :
493
493
name : Permissions Tests Part 6
@@ -535,7 +535,7 @@ jobs:
535
535
536
536
- name : Run TestCafe Tests
537
537
timeout-minutes : 5
538
- run : npx testcafe "firefox :headless" web-app/tests/permissions-6/ --skip-js-errors
538
+ run : npx testcafe "chrome :headless" web-app/tests/permissions-6/ --skip-js-errors
539
539
540
540
all-permissions-7 :
541
541
name : Permissions Tests Part 7
@@ -582,7 +582,7 @@ jobs:
582
582
583
583
- name : Run TestCafe Tests
584
584
timeout-minutes : 5
585
- run : npx testcafe "firefox :headless" web-app/tests/permissions-7/ --skip-js-errors
585
+ run : npx testcafe "chrome :headless" web-app/tests/permissions-7/ --skip-js-errors
586
586
587
587
all-permissions-8 :
588
588
name : Permissions Tests Part 8
@@ -630,7 +630,7 @@ jobs:
630
630
631
631
- name : Run TestCafe Tests
632
632
timeout-minutes : 5
633
- run : npx testcafe "firefox :headless" web-app/tests/permissions-8/ --skip-js-errors
633
+ run : npx testcafe "chrome :headless" web-app/tests/permissions-8/ --skip-js-errors
634
634
635
635
all-permissions-A :
636
636
name : Permissions Tests Part A
@@ -677,7 +677,7 @@ jobs:
677
677
run :
npm install [email protected]
678
678
679
679
- name : Run TestCafe Tests
680
- run : npx testcafe "firefox :headless" web-app/tests/permissions-A/ --skip-js-errors -c 3
680
+ run : npx testcafe "chrome :headless" web-app/tests/permissions-A/ --skip-js-errors -c 3
681
681
682
682
- name : Clean up users & policies
683
683
run : |
@@ -728,7 +728,7 @@ jobs:
728
728
run :
npm install [email protected]
729
729
730
730
- name : Run TestCafe Tests
731
- run : npx testcafe "firefox :headless" web-app/tests/permissions-B/ --skip-js-errors -c 3
731
+ run : npx testcafe "chrome :headless" web-app/tests/permissions-B/ --skip-js-errors -c 3
732
732
733
733
- name : Clean up users & policies
734
734
run : |
@@ -900,7 +900,88 @@ jobs:
900
900
- name : Run tests
901
901
working-directory : ./web-app
902
902
run : yarn test
903
+ replication :
904
+ name : Site Replication Test
905
+ needs :
906
+ - lint-job
907
+ - ui-assets
908
+ - semgrep-static-code-analysis
909
+ - latest-minio
910
+ runs-on : [ubuntu-latest]
911
+
912
+ strategy :
913
+ matrix :
914
+ go-version : [1.22.x]
915
+
916
+ steps :
917
+ - name : Check out code
918
+ uses : actions/checkout@v3
919
+
920
+ - name : Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
921
+ uses : actions/setup-go@v5
922
+ with :
923
+ go-version : ${{ matrix.go-version }}
924
+ id : go
903
925
926
+ - name : Clone github.com/minio/minio
927
+ uses : actions/checkout@master
928
+ with :
929
+ repository : minio/minio
930
+ path : " minio_repository"
931
+ - name : Check-out matching MinIO branch
932
+ env :
933
+ GH_BRANCH : ${{ github.head_ref || github.ref_name }}
934
+ GH_PR_REPO : ${{ github.event.pull_request.head.repo.full_name }}
935
+ run : |
936
+ GH_PR_ACCOUNT=`echo $GH_PR_REPO | sed "s/\\/.*//"`
937
+ if [ ! -z "$GH_PR_ACCOUNT" ] && [ ! "$GH_PR_ACCOUNT" = "minio" ]; then
938
+ ALTREPO="https://github.com/$GH_PR_ACCOUNT/minio.git"
939
+ echo "Attempting to fetch $ALTREPO..."
940
+ git remote add alt $ALTREPO
941
+ (git fetch alt && git checkout "alt/$GH_BRANCH") || echo "$ALTREPO ($GH_BRANCH) not available, so keeping default repository/branch"
942
+ fi
943
+ - uses : actions/cache@v4
944
+ id : minio-latest-cache
945
+ name : MinIO Latest Cache
946
+ with :
947
+ path : |
948
+ ./minio
949
+ key : ${{ runner.os }}-minio-latest-${{ hashFiles('./minio_repository/go.sum') }}
950
+
951
+ - name : Build on ${{ matrix.os }}
952
+ run : |
953
+ echo "The idea is to build minio image from downloaded repository";
954
+ cd $GITHUB_WORKSPACE/minio_repository;
955
+ echo "Get git version to build MinIO Image";
956
+ VERSION=`git rev-parse HEAD`;
957
+ echo $VERSION;
958
+ echo "Create MinIO image";
959
+ make docker VERSION=$VERSION;
960
+
961
+ docker build -q --no-cache -t minio/minio:$VERSION . -f Dockerfile
962
+ echo "Jumping back to console repository to run the integration test"
963
+ cd $GITHUB_WORKSPACE;
964
+
965
+ echo "We are going to use the built image on test-integration";
966
+ MINIO_VERSION="minio/minio:$VERSION";
967
+ echo $MINIO_VERSION;
968
+
969
+ make test-replication MINIO_VERSION=$MINIO_VERSION;
970
+ - uses : actions/cache@v4
971
+ id : coverage-cache-replication
972
+ name : Coverage Cache Replication
973
+ with :
974
+ path : |
975
+ ./replication/coverage/
976
+ key : ${{ runner.os }}-replication-coverage-2-${{ github.run_id }}
977
+
978
+ # To save our replication.out file into an artifact.
979
+ # By default, GitHub stores build logs and artifacts for 90 days.
980
+ - uses : actions/upload-artifact@v4
981
+ with :
982
+ name : replication-artifact
983
+ path : ./replication/coverage/replication.out
984
+ if-no-files-found : error
904
985
sso-integration :
905
986
name : SSO Integration Test
906
987
needs :
@@ -993,6 +1074,7 @@ jobs:
993
1074
- test-api-on-go
994
1075
- test-pkg-on-go
995
1076
- sso-integration
1077
+ - replication
996
1078
runs-on : ${{ matrix.os }}
997
1079
strategy :
998
1080
matrix :
@@ -1028,6 +1110,14 @@ jobs:
1028
1110
./sso-integration/coverage/
1029
1111
key : ${{ runner.os }}-sso-coverage-2-${{ github.run_id }}
1030
1112
1113
+ - uses : actions/cache@v4
1114
+ id : coverage-cache-replication
1115
+ name : Coverage Cache Replication
1116
+ with :
1117
+ path : |
1118
+ ./replication/coverage/
1119
+ key : ${{ runner.os }}-replication-coverage-2-${{ github.run_id }}
1120
+
1031
1121
- uses : actions/cache@v4
1032
1122
id : coverage-cache-api
1033
1123
name : Coverage Cache API
@@ -1044,6 +1134,12 @@ jobs:
1044
1134
./pkg/coverage/
1045
1135
key : ${{ runner.os }}-coverage-pkg-2-${{ github.run_id }}
1046
1136
1137
+ # Get the replication.out file from the artifact since this is working for self host runner.
1138
+ - uses : actions/download-artifact@v4
1139
+ with :
1140
+ name : replication-artifact
1141
+ path : replication/coverage
1142
+
1047
1143
- name : Get coverage
1048
1144
run : |
1049
1145
echo "change directory to gocovmerge"
@@ -1055,12 +1151,12 @@ jobs:
1055
1151
echo "go build gocoverage.go"
1056
1152
go build gocovmerge.go
1057
1153
echo "put together the outs for final coverage resolution"
1058
- ./gocovmerge ../integration/coverage/system.out ../sso-integration/coverage/sso-system.out ../api/coverage/coverage.out ../pkg/coverage/coverage-pkg.out > all.out
1154
+ ./gocovmerge ../integration/coverage/system.out ../replication/coverage/replication.out ../ sso-integration/coverage/sso-system.out ../api/coverage/coverage.out ../pkg/coverage/coverage-pkg.out > all.out
1059
1155
echo "Download mc for Ubuntu"
1060
1156
wget -q https://dl.min.io/client/mc/release/linux-amd64/mc
1061
1157
echo "Change the permissions to execute mc command"
1062
1158
chmod +x mc
1063
- echo "Only run our test if play is up and running"
1159
+ echo "Only run our test if play is up and running since we require it for replication tests here. "
1064
1160
PLAY_IS_ON=`wget --spider --server-response https://play.min.io:9443/login 2>&1 | grep '200\ OK' | wc -l`
1065
1161
if [ $PLAY_IS_ON == 1 ]
1066
1162
then
@@ -1084,6 +1180,11 @@ jobs:
1084
1180
./mc cp system.html play/builds/${{ github.repository }}/${{ github.event.number }}/latest/ || true
1085
1181
./mc cp ../integration/coverage/system.out play/builds/${{ github.repository }}/${{ github.event.number }}/${{ github.run_id }}/ || true
1086
1182
./mc cp ../integration/coverage/system.out play/builds/${{ github.repository }}/${{ github.event.number }}/latest/ || true
1183
+ go tool cover -html=../replication/coverage/replication.out -o replication.html
1184
+ ./mc cp replication.html play/builds/${{ github.repository }}/${{ github.event.number }}/${{ github.run_id }}/ || true
1185
+ ./mc cp replication.html play/builds/${{ github.repository }}/${{ github.event.number }}/latest/ || true
1186
+ ./mc cp ../replication/coverage/replication.out play/builds/${{ github.repository }}/${{ github.event.number }}/${{ github.run_id }}/ || true
1187
+ ./mc cp ../replication/coverage/replication.out play/builds/${{ github.repository }}/${{ github.event.number }}/latest/ || true
1087
1188
go tool cover -html=../sso-integration/coverage/sso-system.out -o sso-system.html
1088
1189
./mc cp sso-system.html play/builds/${{ github.repository }}/${{ github.event.number }}/${{ github.run_id }}/ || true
1089
1190
./mc cp sso-system.html play/builds/${{ github.repository }}/${{ github.event.number }}/latest/ || true
0 commit comments