forked from aws-amplify/amplify-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yml
1196 lines (1156 loc) · 36.5 KB
/
config.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
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
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Javascript Node CircleCI 2.1 configuration file
#
version: 2.1
executors:
build-executor:
docker:
- image: cypress/base:12
auth:
username: $DOCKERHUB_USERNAME
password: $DOCKERHUB_ACCESS_TOKEN
resource_class: large
working_directory: ~/amplify-js
unit-test-executor:
docker:
- image: cypress/base:12
auth:
username: $DOCKERHUB_USERNAME
password: $DOCKERHUB_ACCESS_TOKEN
resource_class: xlarge
working_directory: ~/amplify-js
js-test-executor:
docker:
- image: cypress/included:5.2.0
- image: verdaccio/verdaccio
auth:
username: $DOCKERHUB_USERNAME
password: $DOCKERHUB_ACCESS_TOKEN
resource_class: large
macos-executor:
macos:
xcode: 11.5.0
test_env_vars: &test_env_vars
environment:
NPM_REGISTRY: http://0.0.0.0:4873/
NPM_USER: circleci
NPM_PASS: circleci
NPM_EMAIL: [email protected]
commands:
publish_to_verdaccio:
steps:
- run:
name: 'Set registry to Verdaccio and verify'
# If the registry isn't set correctly, fail the job
command: |
yarn config set registry $NPM_REGISTRY
npm set registry $NPM_REGISTRY
CURRENT_REGISTRY=$(yarn config get registry)
if [ "$CURRENT_REGISTRY" = "$NPM_REGISTRY" ]; then
exit 0
fi
exit 1
- run:
# npm-cli-login allows us to log in to verdaccio in a noninteractive way
# logs in with NPM_USER, NPM_PASS, and NPM_EMAIL env vars
name: 'Install and run npm-cli-login'
command: |
npm i -g npm-cli-adduser
npm-cli-adduser
sleep 1
- run:
name: 'Publish to Verdaccio'
command: |
cd ~/amplify-js
git config --global user.email $NPM_EMAIL
git config --global user.name $NPM_USER
git status
git --no-pager diff
~/amplify-js/.circleci/retry-yarn-script.sh -s publish:verdaccio -n 5 -r true
prepare_test_env:
steps:
- attach_workspace:
at: /root
- restore_cache:
key: amplify-js-{{ .Branch }}-{{ checksum "~/amplify-js-samples-staging/yarn.lock" }}
- publish_to_verdaccio
prepare_no_ui_test_env:
steps:
- attach_workspace:
at: /root
- restore_cache:
key: amplify-js-{{ .Branch }}-{{ checksum "~/amplify-js-samples-staging/yarn.lock" }}
integ_test_js:
parameters:
test_name:
type: string
framework:
type: string
category:
type: string
sample_name:
type: string
spec:
# optional - the script will use sample_name by default
type: string
default: ''
browser:
type: string
default: ''
steps:
- run:
name: 'Install << parameters.test_name >> sample'
command: |
echo "Current NPM registry: " $(yarn config get registry)
~/amplify-js/.circleci/retry-yarn-script.sh -s 'install' -n 3
- run:
name: 'Run cypress tests for << parameters.test_name >> sample on dev'
command: |
cd ~/amplify-js-samples-staging
~/amplify-js/.circleci/retry-yarn-script.sh -s 'ci:test << parameters.framework >> << parameters.category >> << parameters.sample_name >> << parameters.spec >> << parameters.browser >> dev' -n 3
- run:
name: 'Run cypress tests for << parameters.test_name >> sample on prod'
command: |
cd ~/amplify-js-samples-staging
~/amplify-js/.circleci/retry-yarn-script.sh -s 'ci:test << parameters.framework >> << parameters.category >> << parameters.sample_name >> << parameters.spec >> << parameters.browser >> prod' -n 3
- store_artifacts:
path: ~/amplify-js-samples-staging/cypress/videos
- store_artifacts:
path: ~/amplify-js-samples-staging/cypress/screenshots
integ_test_node_js:
parameters:
test_name:
type: string
category:
type: string
sample_name:
type: string
steps:
- run:
name: 'Install << parameters.test_name >> sample'
command: |
echo "Current NPM registry: " $(yarn config get registry)
~/amplify-js/.circleci/retry-yarn-script.sh -s 'install' -n 3
- run:
name: 'Run Node tests for << parameters.test_name >> sample'
command: |
cd ~/amplify-js-samples-staging
~/amplify-js/.circleci/retry-yarn-script.sh -s 'ci:test node << parameters.category >> << parameters.sample_name >> dev' -n 3
integ_test_cypress_no_ui:
parameters:
test_name:
type: string
category:
type: string
spec:
type: string
steps:
- run:
name: 'Change directory into build and run link'
command: |
cd ~/amplify-js/
yarn link-all
- run:
name: 'Link packages into samples staging root'
command: |
yarn link amazon-cognito-identity-js @aws-amplify/core @aws-amplify/cache @aws-amplify/auth
- run:
name: 'Run cypress test << parameters.spec >>'
command: |
cd ~/amplify-js-samples-staging
yarn cypress run --headless --spec ./cypress/integration/auth/<< parameters.spec >>.spec.js --config baseUrl=https://aws.amazon.com/
- store_artifacts:
path: ~/amplify-js-samples-staging/cypress/videos
- store_artifacts:
path: ~/amplify-js-samples-staging/cypress/screenshots
install_verdaccio:
steps:
- run:
name: Install Verdaccio
command: npm i -g verdaccio
- run:
name: Run Verdaccio
background: true
command: |
cd ~
verdaccio
integ_test_rn_ios:
steps:
- attach_workspace:
at: ~/
- install_verdaccio
- publish_to_verdaccio
- run:
name: Yarn Install
command: |
echo "Current NPM registry: " $(yarn config get registry)
~/amplify-js/.circleci/retry-yarn-script.sh -s 'install --frozen-lockfile --non-interactive' -n 3
- run:
name: Install CocoaPods
command: |
cd ios
pod install
- run:
background: true
command: xcrun simctl boot "iPhone 11" || true
name: Start iOS simulator (background)
- run:
background: true
command: yarn start
name: Start Metro Packager (background)
- run:
name: Configure Detox
environment:
HOMEBREW_NO_AUTO_UPDATE: '1'
command: |
brew tap wix/brew
brew install applesimutils
yarn global add detox-cli
- run:
name: Detox Build
command: detox build -c ios.sim.debug
- run:
environment:
JEST_JUNIT_OUTPUT_DIR: 'reports/junit'
JEST_JUNIT_OUTPUT_NAME: 'detox-test-results.xml'
name: Detox Test
command: |
~/amplify-js/.circleci/retry-yarn-script.sh -s 'detox test -c ios.sim.debug -u' -n 3
- store_test_results:
path: reports/junit
- store_artifacts:
path: reports/junit
integ_test_rn_android:
steps:
- attach_workspace:
at: ~/
- install_verdaccio
- publish_to_verdaccio
- run:
# https://reactnative.dev/docs/environment-setup
command: |
cd ~/amplify-js
./.circleci/android-rn.sh export-env
name: Configure Environment Variables
- restore_cache:
key: |
brew-cache-{{ arch }}-{{ .Environment.CACHE_VERSION }}
- run:
# React Native Android can have issues with later versions of Node:
# https://github.com/facebook/react-native/issues/26808
command: |
cd ~/amplify-js
./.circleci/android-rn.sh install-node
name: Install node@10
- run:
# https://reactnative.dev/docs/environment-setup
environment:
HOMEBREW_NO_AUTO_UPDATE: '1'
command: |
brew tap wix/brew >/dev/null
brew tap homebrew/cask >/dev/null
brew install android-sdk >/dev/null
yarn global add detox-cli
touch .watchmanconfig
node -v
name: Configure Detox Environment
- save_cache:
key: |
brew-cache-{{ arch }}-{{ .Environment.CACHE_VERSION }}
paths:
- /usr/local/Homebrew
- ~/Library/Caches/Homebrew
- run:
name: Yarn Install
command: |
echo "Current NPM registry: " $(yarn config get registry)
~/amplify-js/.circleci/retry-yarn-script.sh -s 'install --frozen-lockfile --non-interactive' -n 3
- run:
# Install Android Emulator without Android Studio
command: |
cd ~/amplify-js
./.circleci/android-rn.sh sdkmanager
name: Install Android Emulator
shell: /bin/bash -e
- run:
# Force ssh key generation for emulators
command: |
adb start-server
adb devices
adb kill-server
ls -la ~/.android
name: ADB Start Stop
- run:
# Create Android Emulator without Android Studio
command: >-
avdmanager create avd --force --name TestingAVD
--package "system-images;android-28;default;x86_64"
--tag default --device pixel
name: Create Android Emulator
- run:
background: true
command: |
cd ~/amplify-js
./.circleci/android-rn.sh start-emulator
name: Start Android Emulator (background)
- run:
command: |
cd ~/amplify-js
./.circleci/android-rn.sh wait-for-avd
name: Wait for AVD to be ready
no_output_timeout: 5m
- run:
background: true
command: yarn start
name: Start Metro Packager (background)
- run:
name: Detox Build
command: detox build -c android.emu.debug
- run:
environment:
JEST_JUNIT_OUTPUT_DIR: 'reports/junit'
JEST_JUNIT_OUTPUT_NAME: 'detox-test-results.xml'
name: Detox Test
command: |
~/amplify-js/.circleci/retry-yarn-script.sh -s 'detox test -c android.emu.debug -u' -n 3
- store_test_results:
path: reports/junit
- store_artifacts:
path: reports/junit
jobs:
build:
executor: build-executor
steps:
- checkout
- run:
name: yarn install --non-interactive
# temporarily rename .yarnrc before installing so that we can generate a yarn.lock artifact
command: |
mv .yarnrc ._yarnrc
yarn
- run: yarn build
# storing yarn.lock as an artifact, so that we can quickly get a dependency diff
# with the last working build in the event that some upstream deps break the build in the future
- store_artifacts:
path: yarn.lock
- run:
name: delete lockfile after persisting
command: |
mv ._yarnrc .yarnrc
rm yarn.lock
- save_cache:
key: amplify-ssh-deps-{{ .Branch }}
paths:
- ~/.ssh
- persist_to_workspace:
root: /root
paths:
- amplify-js
unit_test:
executor: unit-test-executor
steps:
- attach_workspace:
at: /root
- run:
name: 'Run Amplify JS unit tests'
command: |
yarn test
yarn coverage
integ_setup:
executor: build-executor
working_directory: ~/
steps:
- run:
name: 'Clone Amplify JS Samples repo, install cypress, install react samples authenticator and link amplify packages'
command: |
mkdir ~/.ssh/ && echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config
echo $SSH_HOST_PUBLIC_KEY >> ~/.ssh/known_hosts
git clone $AMPLIFY_JS_SAMPLES_STAGING_URL
cd amplify-js-samples-staging
yarn
- save_cache:
key: amplify-js-{{ .Branch }}-{{ checksum "amplify-js-samples-staging/yarn.lock" }}
paths:
- ~/.cache ## cache both yarn and Cypress
- persist_to_workspace:
root: /root
paths:
- amplify-js-samples-staging
integ_react_auth:
parameters:
browser:
type: string
executor: js-test-executor
<<: *test_env_vars
working_directory: ~/amplify-js-samples-staging/samples
steps:
- prepare_test_env
- integ_test_js:
test_name: 'React Authenticator'
framework: react
category: auth
sample_name: with-authenticator-legacy
spec: authenticator
browser: << parameters.browser >>
- integ_test_js:
test_name: 'React Authenticator'
framework: react
category: auth
sample_name: amplify-authenticator
spec: ui-amplify-authenticator
browser: << parameters.browser >>
- integ_test_js:
test_name: 'Guest to Authenticated User"'
framework: react
category: auth
sample_name: guest-to-auth-user
spec: guest-to-auth-user
browser: << parameters.browser >>
- integ_test_js:
test_name: 'React Typescript Authenticator'
framework: react
category: auth
sample_name: typescript-amplify-authenticator
spec: ui-amplify-authenticator
browser: << parameters.browser >>
- integ_test_js:
test_name: 'React Custom Authenticator'
framework: react
category: auth
sample_name: amplify-authenticator
spec: custom-authenticator
browser: << parameters.browser >>
- integ_test_js:
test_name: 'React Custom Authenticator'
framework: react
category: auth
sample_name: with-authenticator
spec: ui-amplify-authenticator
browser: << parameters.browser >>
integ_angular_auth:
parameters:
browser:
type: string
executor: js-test-executor
<<: *test_env_vars
working_directory: ~/amplify-js-samples-staging/samples
steps:
- prepare_test_env
- integ_test_js:
test_name: 'Angular Authenticator'
framework: angular
category: auth
sample_name: amplify-authenticator-legacy
spec: authenticator
browser: << parameters.browser >>
- integ_test_js:
test_name: 'Angular Authenticator'
framework: angular
category: auth
sample_name: amplify-authenticator
spec: ui-amplify-authenticator
browser: << parameters.browser >>
- integ_test_js:
test_name: 'Angular Custom Authenticator'
framework: angular
category: auth
sample_name: amplify-authenticator
spec: custom-authenticator
browser: << parameters.browser >>
integ_vue_auth:
parameters:
browser:
type: string
executor: js-test-executor
<<: *test_env_vars
working_directory: ~/amplify-js-samples-staging/samples
steps:
- prepare_test_env
- integ_test_js:
test_name: 'Legacy Vue Authenticator'
framework: vue
category: auth
sample_name: amplify-authenticator-legacy
spec: authenticator
browser: << parameters.browser >>
- integ_test_js:
test_name: 'Vue 2 Authenticator'
framework: vue
category: auth
sample_name: amplify-authenticator
spec: ui-amplify-authenticator
browser: << parameters.browser >>
- integ_test_js:
test_name: 'Vue 3 Authenticator'
framework: vue
category: auth
sample_name: authenticator-vue3
spec: ui-amplify-authenticator
browser: << parameters.browser >>
- integ_test_js:
test_name: 'Vue Custom Authenticator'
framework: vue
category: auth
sample_name: amplify-authenticator
spec: custom-authenticator
browser: << parameters.browser >>
integ_react_predictions:
parameters:
browser:
type: string
executor: js-test-executor
<<: *test_env_vars
working_directory: ~/amplify-js-samples-staging/samples/react/predictions/multi-user-translation
steps:
- prepare_test_env
- integ_test_js:
test_name: 'React Predictions'
framework: react
category: predictions
sample_name: multi-user-translation
spec: multiuser-translation
browser: << parameters.browser >>
integ_react_interactions:
parameters:
browser:
type: string
executor: js-test-executor
<<: *test_env_vars
working_directory: ~/amplify-js-samples-staging/samples/react/interactions/chatbot-component
steps:
- prepare_test_env
- integ_test_js:
test_name: 'React Interactions'
framework: react
category: interactions
sample_name: chatbot-component
spec: chatbot-component
browser: << parameters.browser >>
integ_vue_interactions:
parameters:
browser:
type: string
executor: js-test-executor
<<: *test_env_vars
working_directory: ~/amplify-js-samples-staging/samples/vue/interactions/chatbot-component
steps:
- prepare_test_env
- integ_test_js:
test_name: 'Vue 2 Interactions'
framework: vue
category: interactions
sample_name: chatbot-component
spec: chatbot-component
browser: << parameters.browser >>
- integ_test_js:
test_name: 'Vue 3 Interactions'
framework: vue
category: interactions
sample_name: chatbot-component-vue3
spec: chatbot-component
browser: << parameters.browser >>
integ_angular_interactions:
parameters:
browser:
type: string
executor: js-test-executor
<<: *test_env_vars
working_directory: ~/amplify-js-samples-staging/samples/angular/interactions/chatbot-component
steps:
- prepare_test_env
- integ_test_js:
test_name: 'Angular Interactions'
framework: angular
category: interactions
sample_name: chatbot-component
spec: chatbot-component
browser: << parameters.browser >>
integ_react_datastore:
parameters:
browser:
type: string
executor: js-test-executor
<<: *test_env_vars
working_directory: ~/amplify-js-samples-staging/samples/react/datastore/many-to-many
steps:
- prepare_test_env
- integ_test_js:
test_name: 'React DataStore'
framework: react
category: datastore
sample_name: many-to-many
spec: many-to-many
browser: << parameters.browser >>
integ_react_datastore_multi_auth_one_rule:
parameters:
browser:
type: string
executor: js-test-executor
<<: *test_env_vars
working_directory: ~/amplify-js-samples-staging/samples/react/datastore/multi-auth
steps:
- prepare_test_env
- integ_test_js:
test_name: 'React DataStore Multi-Auth - One Rule'
framework: react
category: datastore
sample_name: multi-auth
spec: multi-auth-one-rule
browser: << parameters.browser >>
integ_react_datastore_multi_auth_two_rules:
parameters:
browser:
type: string
executor: js-test-executor
<<: *test_env_vars
working_directory: ~/amplify-js-samples-staging/samples/react/datastore/multi-auth
steps:
- prepare_test_env
- integ_test_js:
test_name: 'React DataStore Multi-Auth - Two Rules'
framework: react
category: datastore
sample_name: multi-auth
spec: multi-auth-two-rules
browser: << parameters.browser >>
integ_react_datastore_multi_auth_three_plus_rules:
parameters:
browser:
type: string
executor: js-test-executor
<<: *test_env_vars
working_directory: ~/amplify-js-samples-staging/samples/react/datastore/multi-auth
steps:
- prepare_test_env
- integ_test_js:
test_name: 'React DataStore Multi-Auth - Three Plus Rules'
framework: react
category: datastore
sample_name: multi-auth
spec: multi-auth-three-plus-rules
browser: << parameters.browser >>
integ_react_datastore_subs_disabled:
parameters:
browser:
type: string
executor: js-test-executor
<<: *test_env_vars
working_directory: ~/amplify-js-samples-staging/samples/react/datastore/subs-disabled
steps:
- prepare_test_env
- integ_test_js:
test_name: 'DataStore - Subs Disabled'
framework: react
category: datastore
sample_name: subs-disabled
spec: subs-disabled
browser: << parameters.browser >>
integ_react_datastore_consecutive_saves:
parameters:
browser:
type: string
executor: js-test-executor
<<: *test_env_vars
working_directory: ~/amplify-js-samples-staging/samples/react/datastore/consecutive-saves
steps:
- prepare_test_env
- integ_test_js:
test_name: 'DataStore - Subs Disabled'
framework: react
category: datastore
sample_name: consecutive-saves
spec: consecutive-saves
browser: << parameters.browser >>
integ_react_storage:
parameters:
browser:
type: string
executor: js-test-executor
<<: *test_env_vars
working_directory: ~/amplify-js-samples-staging/samples/react/storage/storageApp
steps:
- prepare_test_env
- integ_test_js:
test_name: 'React Storage'
framework: react
category: storage
sample_name: storageApp
spec: storage
browser: << parameters.browser >>
integ_react_storage_multipart_progress:
parameters:
browser:
type: string
executor: js-test-executor
<<: *test_env_vars
working_directory: ~/amplify-js-samples-staging/samples/react/storage/multi-part-upload-with-progress
steps:
- prepare_test_env
- integ_test_js:
test_name: 'React Storage Multi-Part Upload with Progress'
framework: react
category: storage
sample_name: multi-part-upload-with-progress
spec: multi-part-upload-with-progress
browser: << parameters.browser >>
integ_react_storage_ui:
executor: js-test-executor
<<: *test_env_vars
working_directory: ~/amplify-js-samples-staging/samples/react/storage/storageComp
steps:
- prepare_test_env
- integ_test_js:
test_name: 'React Storage UI Components'
framework: react
category: storage
sample_name: storageComp
spec: storage-comp
integ_react_amazon_cognito_identity_js_cookie_storage:
parameters:
browser:
type: string
executor: js-test-executor
<<: *test_env_vars
working_directory: ~/amplify-js-samples-staging/samples/react/auth/amazon-cognito-identity-js-cookie-storage
steps:
- prepare_test_env
- integ_test_js:
test_name: 'amazon-cognito-identity-js-cookie-storage'
framework: react
category: auth
sample_name: amazon-cognito-identity-js-cookie-storage
spec: amazon-cognito-identity-js-cookie-storage
browser: << parameters.browser >>
integ_react_amazon_cognito_identity_js:
parameters:
browser:
type: string
executor: js-test-executor
<<: *test_env_vars
working_directory: ~/amplify-js-samples-staging/samples/react/auth/amazon-cognito-identity-js
steps:
- prepare_test_env
- integ_test_js:
test_name: 'amazon-cognito-identity-js'
framework: react
category: auth
sample_name: amazon-cognito-identity-js
spec: amazon-cognito-identity-js
browser: << parameters.browser >>
integ_node_amazon_cognito_identity_js:
executor: js-test-executor
<<: *test_env_vars
working_directory: ~/amplify-js-samples-staging/samples/node/auth/amazon-cognito-identity-js
steps:
- prepare_test_env
- integ_test_node_js:
test_name: 'amazon-cognito-identity-js'
category: auth
sample_name: amazon-cognito-identity-js
integ_rn_ios_storage:
executor: macos-executor
<<: *test_env_vars
working_directory: ~/amplify-js-samples-staging/samples/react-native/storage/StorageApp
steps:
- integ_test_rn_ios
integ_rn_ios_storage_multipart_progress:
executor: macos-executor
<<: *test_env_vars
working_directory: ~/amplify-js-samples-staging/samples/react-native/storage/MultiPartUploadWithProgress
steps:
- integ_test_rn_ios
integ_rn_ios_push_notifications:
executor: macos-executor
<<: *test_env_vars
working_directory: ~/amplify-js-samples-staging/samples/react-native/push-notifications/PushNotificationApp
steps:
- integ_test_rn_ios
integ_rn_android_storage:
executor: macos-executor
<<: *test_env_vars
working_directory: ~/amplify-js-samples-staging/samples/react-native/storage/StorageApp
steps:
- integ_test_rn_android
integ_rn_android_storage_multipart_progress:
executor: macos-executor
<<: *test_env_vars
working_directory: ~/amplify-js-samples-staging/samples/react-native/storage/MultiPartUploadWithProgress
steps:
- integ_test_rn_android
integ_datastore_auth:
parameters:
scenario:
type: string
executor: js-test-executor
<<: *test_env_vars
working_directory: ~/amplify-js-samples-staging/samples
steps:
- prepare_test_env
- integ_test_js:
test_name: 'DataStore Auth - Chrome'
framework: react
category: datastore
sample_name: << parameters.scenario >>
spec: << parameters.scenario >>
browser: chrome
- integ_test_js:
test_name: 'DataStore Auth - Firefox'
framework: react
category: datastore
sample_name: << parameters.scenario >>
spec: << parameters.scenario >>
browser: firefox
integ_duplicate_packages:
parameters:
browser:
type: string
executor: js-test-executor
<<: *test_env_vars
working_directory: ~/amplify-js-samples-staging/samples/react/version-conflict/duplicate-packages
steps:
- prepare_test_env
- integ_test_js:
test_name: 'Duplicate Package Errors'
framework: react
category: version-conflict
sample_name: duplicate-packages
spec: duplicate-packages
browser: << parameters.browser >>
integ_auth_test_cypress_no_ui:
working_directory: ~/amplify-js-samples-staging/
executor: js-test-executor
steps:
- prepare_no_ui_test_env
- integ_test_cypress_no_ui:
test_name: 'Token revocation'
category: 'auth'
spec: 'token-revocation'
deploy:
executor: macos-executor
working_directory: ~/amplify-js
steps:
- attach_workspace:
at: ~/
- run:
name: 'Publish to Amplify Package'
command: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
npm whoami
git config --global user.email $GITHUB_EMAIL
git config --global user.name $GITHUB_USER
git status
git --no-pager diff
yarn publish:$CIRCLE_BRANCH
post_release:
executor: build-executor
steps:
- attach_workspace:
at: /root
- restore_cache:
keys:
- amplify-ssh-deps-{{ .Branch }}
- amplify-ssh-deps
- run:
name: 'Post-release steps'
command: |
git config --global user.email $GITHUB_EMAIL
git config --global user.name $GITHUB_USER
git pull origin release
yarn workspace @aws-amplify/core build
git add ./packages/core/src/Platform/version.ts
git commit -m "chore(release): update version.ts [ci skip]"
git push origin release
git push origin release:main
releasable_branches: &releasable_branches
branches:
only:
- release
- main
- ui-components/main
- 1.0-stable
test_browsers: &test_browsers
browser: [chrome, firefox]
datastore_auth_scenarios: &datastore_auth_scenarios
scenario: [
owner-based-default, # TODO: Add `owner-based-operations` when tests pass
static-user-pool-groups-default,
static-user-pool-groups-operations,
owner-and-group-different-models-default,
owner-and-group-same-model-default,
owner-and-group-same-model-operations,
dynamic-user-pool-groups-default,
dynamic-user-pool-groups-owner-based-default,
private-auth-default,
private-auth-iam,
public-auth-default,
public-auth-iam,
owner-custom-claim-default,
owner-custom-field-default,
]
workflows:
build_test_deploy:
jobs:
- build
- integ_setup:
filters:
<<: *releasable_branches
- unit_test:
requires:
- build
- integ_react_auth:
requires:
- integ_setup
- build
filters:
<<: *releasable_branches
matrix:
parameters:
<<: *test_browsers
- integ_auth_test_cypress_no_ui:
requires:
- integ_setup
- build
filters:
<<: *releasable_branches
- integ_angular_auth:
requires:
- integ_setup
- build
filters:
<<: *releasable_branches
matrix:
parameters:
<<: *test_browsers
- integ_vue_auth:
requires:
- integ_setup
- build
filters:
<<: *releasable_branches
matrix:
parameters:
<<: *test_browsers
- integ_react_predictions:
requires:
- integ_setup
- build
filters:
<<: *releasable_branches
matrix:
parameters:
<<: *test_browsers
- integ_react_interactions:
requires:
- integ_setup
- build
filters:
<<: *releasable_branches
matrix:
parameters:
<<: *test_browsers
- integ_vue_interactions:
requires:
- integ_setup
- build
filters:
<<: *releasable_branches
matrix:
parameters:
<<: *test_browsers
- integ_angular_interactions:
requires: