forked from mui/material-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yml
882 lines (867 loc) · 28.4 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
version: 2.1
orbs:
aws-cli: circleci/[email protected]
aws-s3: circleci/[email protected]
parameters:
browserstack-force:
description: Whether to force browserstack usage. We have limited resources on browserstack so the pipeline might decide to skip browserstack if this parameter isn't set to true.
type: boolean
default: false
react-version:
description: The version of react to be used
type: string
default: stable
workflow:
description: The name of the workflow to run
type: string
default: pipeline
e2e-base-url:
description: The base url for running end-to-end test
type: string
default: ''
defaults: &defaults
parameters:
react-version:
description: The version of react to be used
type: string
default: << pipeline.parameters.react-version >>
test-gate:
description: A particular type of tests that should be run
type: string
default: undefined
e2e-base-url:
description: The base url for running end-to-end test
type: string
default: << pipeline.parameters.e2e-base-url >>
environment:
# Keep in sync with "Save playwright cache"
PLAYWRIGHT_BROWSERS_PATH: /tmp/pw-browsers
# expose it globally otherwise we have to thread it from each job to the install command
BROWSERSTACK_FORCE: << pipeline.parameters.browserstack-force >>
REACT_VERSION: << parameters.react-version >>
TEST_GATE: << parameters.test-gate >>
AWS_REGION_ARTIFACTS: eu-central-1
working_directory: /tmp/material-ui
docker:
- image: cimg/node:18.18
# CircleCI has disabled the cache across forks for security reasons.
# Following their official statement, it was a quick solution, they
# are working on providing this feature back with appropriate security measures.
# https://discuss.circleci.com/t/saving-cache-stopped-working-warning-skipping-this-step-disabled-in-configuration/24423/21
#
# restore_repo: &restore_repo
# restore_cache:
# key: v1-repo-{{ .Branch }}-{{ .Revision }}
commands:
install_js:
parameters:
browsers:
type: boolean
default: false
description: 'Set to true if you intend to any browser (e.g. with playwright).'
steps:
- run:
name: View install environment
command: |
node --version
yarn --version
- run:
name: Resolve react version
command: |
node scripts/useReactVersion.mjs
# log a patch for maintainers who want to check out this change
git --no-pager diff HEAD
- restore_cache:
name: Restore yarn cache
keys:
- v8-yarn-{{ checksum "yarn.lock" }}
- run:
name: Set yarn cache folder
command: |
# Keep path in sync with `save_cache` for key "v8-yarn-"
yarn config set cache-folder /tmp/yarn-cache
# Debug information
yarn cache dir
yarn cache list
- when:
condition: << parameters.browsers >>
steps:
- run:
name: Prepare playwright hash
command: yarn --json list --pattern playwright > /tmp/playwright_info.json
- store_artifacts:
name: Debug playwright hash
path: /tmp/playwright_info.json
- restore_cache:
name: Restore playwright cache
keys:
- v6-playwright-{{ arch }}-{{ checksum "/tmp/playwright_info.json" }}
- run:
name: Install js dependencies
command: yarn install
- when:
condition: << parameters.browsers >>
steps:
- run:
name: Install playwright browsers
command: yarn playwright install --with-deps
environment:
PLAYWRIGHT_BROWSERS_PATH: /tmp/pw-browsers
- save_cache:
name: Save yarn cache
key: v8-yarn-{{ checksum "yarn.lock" }}
paths:
# Keep path in sync with "Set yarn cache folder"
# Can't use environment variables for `save_cache` paths (tested in https://app.circleci.com/pipelines/github/mui/material-ui/37813/workflows/5b1e207f-ac8b-44e7-9ba4-d0f9a01f5c55/jobs/223370)
- /tmp/yarn-cache
- when:
condition: << parameters.browsers >>
steps:
- save_cache:
name: Save playwright cache
key: v6-playwright-{{ arch }}-{{ checksum "/tmp/playwright_info.json" }}
paths:
# Keep path in sync with "PLAYWRIGHT_BROWSERS_PATH"
# Can't use environment variables for `save_cache` paths (tested in https://app.circleci.com/pipelines/github/mui/material-ui/37813/workflows/5b1e207f-ac8b-44e7-9ba4-d0f9a01f5c55/jobs/223370)
- /tmp/pw-browsers
jobs:
checkout:
<<: *defaults
steps:
- checkout
- install_js
- when:
# Install can be "dirty" when running with non-default versions of React
condition:
equal: [<< parameters.react-version >>, stable]
steps:
- run:
name: Should not have any git not staged
command: git add -A && git diff --exit-code --staged
- run:
name: Check for duplicated packages
command: yarn deduplicate
test_unit:
<<: *defaults
steps:
- checkout
- install_js
- run:
name: Tests fake browser
command: yarn test:coverage:ci
- run:
name: Check coverage generated
command: |
if ! [[ -s coverage/lcov.info ]]
then
exit 1
fi
- run:
name: material-ui-icons
command: |
# latest commit
LATEST_COMMIT=$(git rev-parse HEAD)
# latest commit where packages/mui-icons-material was changed
FOLDER_COMMIT=$(git log -1 --format=format:%H --full-diff packages/mui-icons-material)
if [ $FOLDER_COMMIT = $LATEST_COMMIT ]; then
echo "changes, let's run the tests"
yarn workspace @mui/icons-material build:typings
yarn workspace @mui/icons-material test:built-typings
else
echo "no changes"
fi
- run:
name: typescript-to-proptypes
command: |
# latest commit
LATEST_COMMIT=$(git rev-parse HEAD)
# latest commit where packages/typescript-to-proptypes was changed
FOLDER_COMMIT=$(git log -1 --format=format:%H --full-diff packages/typescript-to-proptypes)
if [ $FOLDER_COMMIT = $LATEST_COMMIT ]; then
echo "changes, let's run the tests"
yarn workspace typescript-to-proptypes test
else
echo "no changes"
fi
- run:
name: Coverage
command: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov -t ${CODECOV_TOKEN} -Z -F "$REACT_VERSION-jsdom"
test_lint:
<<: *defaults
steps:
- checkout
- install_js
- run:
name: Eslint
command: yarn eslint:ci
- run:
name: Stylelint
command: yarn stylelint
- run:
name: Lint JSON
command: yarn jsonlint
- run:
name: Lint Markdown
command: yarn markdownlint
test_static:
<<: *defaults
steps:
- checkout
- install_js
- run:
name: '`yarn prettier` changes committed?'
command: yarn prettier --check
- run:
name: Generate PropTypes
command: yarn proptypes
- run:
name: '`yarn proptypes` changes committed?'
command: git add -A && git diff --exit-code --staged
- run:
name: 'Write "use client" directive'
command: yarn rsc:build
- run:
name: '`yarn rsc:build` changes committed?'
command: git add -A && git diff --exit-code --staged
- run:
name: Generate the documentation
command: yarn docs:api
- run:
name: '`yarn docs:api` changes committed?'
command: git add -A && git diff --exit-code --staged
- run:
name: Update the navigation translations
command: yarn docs:i18n
- run:
name: '`yarn docs:i18n` changes committed?'
command: git add -A && git diff --exit-code --staged
- run:
name: '`yarn extract-error-codes` changes committed?'
command: |
yarn extract-error-codes
git add -A && git diff --exit-code --staged
- run:
name: '`yarn docs:link-check` changes committed?'
command: |
yarn docs:link-check
git add -A && git diff --exit-code --staged
test_types:
<<: *defaults
resource_class: 'medium+'
steps:
- checkout
- install_js
- run:
name: Transpile TypeScript demos
command: yarn docs:typescript:formatted
- run:
name: '`yarn docs:typescript:formatted` changes committed?'
command: git add -A && git diff --exit-code --staged
- run:
name: Tests TypeScript definitions
command: yarn typescript:ci
- run:
name: Test module augmentation
command: |
yarn workspace @mui/material typescript:module-augmentation
yarn workspace @mui/base typescript:module-augmentation
yarn workspace @mui/joy typescript:module-augmentation
- run:
name: Diff declaration files
command: |
git add -f packages/mui-material/build || echo '/material declarations do not exist'
git add -f packages/mui-lab/build || echo '/lab declarations do not exist'
git add -f packages/mui-utils/build || echo '/utils declarations do not exist'
yarn lerna run build:types
git --no-pager diff
- run:
name: Any defect declaration files?
command: node scripts/testBuiltTypes.mjs
- save_cache:
name: Save generated declaration files
key: typescript-declaration-files-{{ .Branch }}-{{ .Revision }}
paths:
# packages with generated declaration files
- packages/mui-material/build
- packages/mui-lab/build
- packages/mui-utils/build
test_types_next:
<<: *defaults
resource_class: 'medium+'
steps:
- checkout
- run:
name: Resolve typescript version
environment:
TYPESCRIPT_DIST_TAG: next
command: |
node scripts/useTypescriptDistTag.mjs
# log a patch for maintainers who want to check out this change
git --no-pager diff HEAD
- install_js
- run:
name: Tests TypeScript definitions
command: |
# ignore build failures
# it's expected that typescript@next fails since the lines of the errors
# change frequently. This build is monitored regardless of its status
set +e
yarn typescript:ci
exit 0
- restore_cache:
name: Restore generated declaration files
keys:
# We assume that the target branch is `next` and that declaration files are persisted in commit order.
# "If there are multiple matches, the most recently generated cache will be used."
- typescript-declaration-files-next
- run:
name: Diff declaration files
command: |
git add -f packages/mui-material/build || echo '/core declarations do not exist'
git add -f packages/mui-lab/build || echo '/lab declarations do not exist'
git add -f packages/mui-utils/build || echo '/utils declarations do not exist'
yarn lerna run build:types
git --no-pager diff
- run:
name: Log defect declaration files
command: |
# ignore build failures
# Fixing these takes some effort that isn't viable to merge in a single PR.
# We'll simply monitor them for now.
set +e
node scripts/testBuiltTypes.mjs
exit 0
test_browser:
<<: *defaults
resource_class: 'medium+'
docker:
- image: mcr.microsoft.com/playwright:v1.39.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
- checkout
- install_js:
browsers: true
- run:
name: Tests real browsers
command: yarn test:karma
- run:
name: Check coverage generated
command: |
if ! [[ -s coverage/lcov.info ]]
then
exit 1
fi
- run:
name: Coverage
command: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov -t ${CODECOV_TOKEN} -Z -F "$REACT_VERSION-browser"
- store_artifacts:
# hardcoded in karma-webpack
path: /tmp/_karma_webpack_
destination: artifact-file
test_e2e:
<<: *defaults
docker:
- image: mcr.microsoft.com/playwright:v1.39.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
- checkout
- install_js:
browsers: true
- run:
name: yarn test:e2e
command: yarn test:e2e
- run:
name: Can we generate the @mui/material umd build?
command: yarn workspace @mui/material build:umd
- run:
name: Test umd release
command: yarn test:umd
test_e2e_website:
<<: *defaults
docker:
- image: mcr.microsoft.com/playwright:v1.39.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
- checkout
- install_js:
browsers: true
- run:
name: yarn test:e2e-website
command: yarn test:e2e-website
environment:
PLAYWRIGHT_TEST_BASE_URL: << parameters.e2e-base-url >>
test_profile:
<<: *defaults
docker:
- image: mcr.microsoft.com/playwright:v1.39.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
- checkout
- install_js:
browsers: true
- run:
name: Tests real browsers
# Run a couple of times for a better sample.
# TODO: hack something together where we can compile once and run multiple times e.g. by abusing watchmode.
command: |
# Running on chrome only since actual times are innaccurate anyway
# The other reason is that browserstack allows little concurrency so it's likely that we're starving other runs.
yarn test:karma:profile --browsers chrome,chromeHeadless
yarn test:karma:profile --browsers chrome,chromeHeadless
yarn test:karma:profile --browsers chrome,chromeHeadless
yarn test:karma:profile --browsers chrome,chromeHeadless
yarn test:karma:profile --browsers chrome,chromeHeadless
# Persist reports for inspection in https://mui-dashboard.netlify.app/
- store_artifacts:
# see karma.conf.profile.js reactProfilerReporter.outputDir
path: tmp/react-profiler-report/karma
destination: react-profiler-report/karma
test_regressions:
<<: *defaults
docker:
- image: mcr.microsoft.com/playwright:v1.39.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
- checkout
- install_js:
browsers: true
- run:
name: Run visual regression tests
command: xvfb-run yarn test:regressions
- run:
name: Upload screenshots to Argos CI
command: yarn test:argos
test_bundling_prepare:
<<: *defaults
steps:
- checkout
- install_js
- run:
name: Build packages for fixtures
command: yarn lerna run --scope "@mui/*" build
- persist_to_workspace:
root: packages
paths:
- '*/build'
test_bundling_node-esm:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/node-esm/
steps:
- checkout:
path: /tmp/material-ui
- attach_workspace:
at: /tmp/material-ui/packages
- run:
name: Prepare fixture
command: |
node ../../scripts/createFixture node-esm
- run:
name: Install dependencies
command: |
yarn
node ../../scripts/useBuildFromSource.js .
- run:
name: Test fixture
command: |
# TODO: Known failure
set +e
yarn start
exit 0
test_bundling_next-webpack4:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/next-webpack4/
docker:
- image: mcr.microsoft.com/playwright:v1.39.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
- checkout:
path: /tmp/material-ui
- attach_workspace:
at: /tmp/material-ui/packages
- run:
name: Prepare fixture
command: |
node ../../scripts/createFixture next-webpack4
- run:
name: Install dependencies
command: |
yarn
node ../../scripts/useBuildFromSource.js .
- run:
name: Test fixture
command: yarn start
test_bundling_next-webpack5:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/next-webpack5/
docker:
- image: mcr.microsoft.com/playwright:v1.39.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
- checkout:
path: /tmp/material-ui
- attach_workspace:
at: /tmp/material-ui/packages
- run:
name: Prepare fixture
command: |
node ../../scripts/createFixture next-webpack5
- run:
name: Install dependencies
command: |
yarn
node ../../scripts/useBuildFromSource.js .
- run:
name: Test fixture
command: yarn start
test_bundling_create-react-app:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/create-react-app/
docker:
- image: mcr.microsoft.com/playwright:v1.39.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
- checkout:
path: /tmp/material-ui
- attach_workspace:
at: /tmp/material-ui/packages
- run:
name: Prepare fixture
command: |
node ../../scripts/createFixture create-react-app
- run:
name: Install dependencies
command: |
yarn
node ../../scripts/useBuildFromSource.js .
- run:
name: Test fixture
command: yarn start
test_bundling_snowpack:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/snowpack/
docker:
- image: mcr.microsoft.com/playwright:v1.39.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
- checkout:
path: /tmp/material-ui
- attach_workspace:
at: /tmp/material-ui/packages
- run:
name: Prepare fixture
command: |
node ../../scripts/createFixture snowpack
- run:
name: Install dependencies
command: |
yarn
node ../../scripts/useBuildFromSource.js .
- run:
name: Test fixture
command: yarn start
test_bundling_vite:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/vite/
docker:
- image: mcr.microsoft.com/playwright:v1.39.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
- checkout:
path: /tmp/material-ui
- attach_workspace:
at: /tmp/material-ui/packages
- run:
name: Prepare fixture
command: |
node ../../scripts/createFixture vite
- run:
name: Install dependencies
command: |
yarn
node ../../scripts/useBuildFromSource.js .
- run:
name: Test fixture
command: yarn start
test_bundling_esbuild:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/esbuild/
docker:
- image: mcr.microsoft.com/playwright:v1.39.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
- checkout:
path: /tmp/material-ui
- attach_workspace:
at: /tmp/material-ui/packages
- run:
name: Prepare fixture
command: |
node ../../scripts/createFixture esbuild
- run:
name: Install dependencies
command: |
yarn
node ../../scripts/useBuildFromSource.js .
- run:
name: Test fixture
command: |
# TODO: Known failure
set +e
yarn start
exit 0
test_bundling_gatsby:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/gatsby/
docker:
- image: mcr.microsoft.com/playwright:v1.39.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
- checkout:
path: /tmp/material-ui
- attach_workspace:
at: /tmp/material-ui/packages
- run:
name: Prepare fixture
command: |
node ../../scripts/useBuildFromSource.js .
node ../../scripts/createFixture gatsby
- run:
name: Install dependencies
command: yarn
- run:
name: Test fixture
command: yarn start
test_bundle_size_monitor:
<<: *defaults
steps:
- checkout
- install_js
- run:
name: prepare danger on PRs
command: yarn danger ci
environment:
DANGER_COMMAND: prepareBundleSizeReport
- run:
name: build @mui packages
command: yarn lerna run --ignore @mui/icons-material --concurrency 8 --scope "@mui/*" build
- run:
name: create @mui/material canary distributable
command: |
cd packages/mui-material/build
npm version 0.0.0-canary.${CIRCLE_SHA1} --no-git-tag-version
npm pack
mv mui-material-0.0.0-canary.${CIRCLE_SHA1}.tgz ../../../mui-material.tgz
- when:
# don't run on PRs
condition:
not:
matches:
# "^pull/\d+" is not valid YAML
# "^pull/\\d+" matches neither 'pull/1' nor 'main'
# Note that we want to include 'pull/1', 'pull/1/head' and ''pull/1/merge'
pattern: '^pull/.+$'
value: << pipeline.git.branch >>
steps:
- aws-cli/setup:
aws_access_key_id: AWS_ACCESS_KEY_ID_ARTIFACTS
aws_secret_access_key: AWS_SECRET_ACCESS_KEY_ARTIFACTS
region: ${AWS_REGION_ARTIFACTS}
# Upload distributables to S3
- aws-s3/copy:
from: mui-material.tgz
to: s3://mui-org-ci/artifacts/$CIRCLE_BRANCH/$CIRCLE_SHA1/
- store_artifacts:
path: mui-material.tgz
destination: mui-material.tgz
- run:
name: create a size snapshot
command: yarn size:snapshot
- store_artifacts:
name: persist size snapshot as pipeline artifact
path: size-snapshot.json
destination: size-snapshot.json
- when:
# don't run on PRs
condition:
not:
matches:
# "^pull/\d+" is not valid YAML
# "^pull/\\d+" matches neither 'pull/1' nor 'main'
# Note that we want to include 'pull/1', 'pull/1/head' and ''pull/1/merge'
pattern: '^pull/.+$'
value: << pipeline.git.branch >>
steps:
- aws-cli/setup:
aws_access_key_id: AWS_ACCESS_KEY_ID_ARTIFACTS
aws_secret_access_key: AWS_SECRET_ACCESS_KEY_ARTIFACTS
region: ${AWS_REGION_ARTIFACTS}
# persist size snapshot on S3
- aws-s3/copy:
arguments: --content-type application/json
from: size-snapshot.json
to: s3://mui-org-ci/artifacts/$CIRCLE_BRANCH/$CIRCLE_SHA1/
# symlink size-snapshot to latest
- aws-s3/copy:
arguments: --content-type application/json
from: size-snapshot.json
to: s3://mui-org-ci/artifacts/$CIRCLE_BRANCH/latest/
- run:
name: run danger on PRs
command: yarn danger ci --fail-on-errors
environment:
DANGER_COMMAND: 'reportBundleSize'
test_benchmark:
<<: *defaults
docker:
- image: mcr.microsoft.com/playwright:v1.39.0-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
- checkout
- install_js:
browsers: true
- run: yarn benchmark:browser
- store_artifacts:
name: Publish benchmark results as a pipeline artifact.
path: tmp/benchmarks
destination: benchmarks
workflows:
version: 2
pipeline:
when:
equal: [pipeline, << pipeline.parameters.workflow >>]
jobs:
- checkout
- test_unit:
requires:
- checkout
- test_lint:
requires:
- checkout
- test_static:
requires:
- checkout
- test_types:
requires:
- checkout
- test_browser:
requires:
- checkout
- test_regressions:
requires:
- checkout
- test_e2e:
requires:
- checkout
- test_bundle_size_monitor:
requires:
- checkout
e2e-website:
when:
equal: [e2e-website, << pipeline.parameters.workflow >>]
jobs:
- checkout
- test_e2e_website:
requires:
- checkout
bundling:
when:
equal: [bundling, << pipeline.parameters.workflow >>]
jobs:
- test_bundling_prepare
- test_bundling_node-esm:
requires:
- test_bundling_prepare
- test_bundling_next-webpack4:
requires:
- test_bundling_prepare
- test_bundling_next-webpack5:
requires:
- test_bundling_prepare
- test_bundling_create-react-app:
requires:
- test_bundling_prepare
- test_bundling_snowpack:
requires:
- test_bundling_prepare
- test_bundling_vite:
requires:
- test_bundling_prepare
- test_bundling_esbuild:
requires:
- test_bundling_prepare
- test_bundling_gatsby:
requires:
- test_bundling_prepare
profile:
when:
equal: [profile, << pipeline.parameters.workflow >>]
jobs:
- test_profile
react-17:
triggers:
- schedule:
cron: '0 0 * * *'
filters:
branches:
only:
- master
jobs:
- test_unit:
react-version: ^17.0.0
- test_browser:
react-version: ^17.0.0
- test_regressions:
react-version: ^17.0.0
- test_e2e:
react-version: ^17.0.0
react-next:
triggers:
- schedule:
cron: '0 0 * * *'
filters:
branches:
only:
- master
jobs:
- test_unit:
react-version: next
- test_browser:
react-version: next
- test_regressions:
react-version: next
- test_e2e:
react-version: next
typescript-next:
triggers:
- schedule:
cron: '0 0 * * *'
filters:
branches:
only:
- master
jobs:
- test_types_next
benchmark:
when:
equal: [benchmark, << pipeline.parameters.workflow >>]
jobs:
- test_benchmark