Skip to content

Commit 9d9b038

Browse files
[core] Use Circle CI context
1 parent b579513 commit 9d9b038

File tree

1 file changed

+36
-23
lines changed

1 file changed

+36
-23
lines changed

.circleci/config.yml

Lines changed: 36 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ parameters:
2121
type: string
2222
default: ''
2323

24-
defaults: &defaults
24+
default-job: &default-job
2525
parameters:
2626
react-version:
2727
description: The version of react to be used
@@ -47,6 +47,10 @@ defaults: &defaults
4747
docker:
4848
- image: cimg/node:18.19
4949

50+
default-context: &default-context
51+
context:
52+
- org-global
53+
5054
# CircleCI has disabled the cache across forks for security reasons.
5155
# Following their official statement, it was a quick solution, they
5256
# are working on providing this feature back with appropriate security measures.
@@ -113,7 +117,7 @@ commands:
113117

114118
jobs:
115119
checkout:
116-
<<: *defaults
120+
<<: *default-job
117121
steps:
118122
- checkout
119123
- install_js
@@ -135,7 +139,7 @@ jobs:
135139
pnpm dedupe --check
136140
fi
137141
test_unit:
138-
<<: *defaults
142+
<<: *default-job
139143
steps:
140144
- checkout
141145
- install_js
@@ -187,7 +191,7 @@ jobs:
187191
chmod +x codecov
188192
./codecov -t ${CODECOV_TOKEN} -Z -F "$REACT_VERSION-jsdom"
189193
test_lint:
190-
<<: *defaults
194+
<<: *default-job
191195
steps:
192196
- checkout
193197
- install_js
@@ -204,7 +208,7 @@ jobs:
204208
name: Lint Markdown
205209
command: pnpm markdownlint
206210
test_static:
207-
<<: *defaults
211+
<<: *default-job
208212
steps:
209213
- checkout
210214
- install_js
@@ -246,7 +250,7 @@ jobs:
246250
pnpm docs:link-check
247251
git add -A && git diff --exit-code --staged
248252
test_types:
249-
<<: *defaults
253+
<<: *default-job
250254
resource_class: 'medium+'
251255
steps:
252256
- checkout
@@ -288,7 +292,7 @@ jobs:
288292
- packages/mui-lab/build
289293
- packages/mui-utils/build
290294
test_types_next:
291-
<<: *defaults
295+
<<: *default-job
292296
resource_class: 'medium+'
293297
steps:
294298
- checkout
@@ -335,7 +339,7 @@ jobs:
335339
node scripts/testBuiltTypes.mjs
336340
exit 0
337341
test_browser:
338-
<<: *defaults
342+
<<: *default-job
339343
resource_class: 'medium+'
340344
docker:
341345
- image: mcr.microsoft.com/playwright:v1.42.1-focal
@@ -366,7 +370,7 @@ jobs:
366370
path: /tmp/_karma_webpack_
367371
destination: artifact-file
368372
test_e2e:
369-
<<: *defaults
373+
<<: *default-job
370374
docker:
371375
- image: mcr.microsoft.com/playwright:v1.42.1-focal
372376
environment:
@@ -386,7 +390,7 @@ jobs:
386390
command: pnpm test:umd
387391
test_e2e_website:
388392
# NOTE: This workflow runs after successful docs deploy. See /test/e2e-website/README.md#ci
389-
<<: *defaults
393+
<<: *default-job
390394
docker:
391395
- image: mcr.microsoft.com/playwright:v1.42.1-focal
392396
environment:
@@ -401,7 +405,7 @@ jobs:
401405
environment:
402406
PLAYWRIGHT_TEST_BASE_URL: << parameters.e2e-base-url >>
403407
test_profile:
404-
<<: *defaults
408+
<<: *default-job
405409
docker:
406410
- image: mcr.microsoft.com/playwright:v1.42.1-focal
407411
environment:
@@ -428,7 +432,7 @@ jobs:
428432
path: tmp/react-profiler-report/karma
429433
destination: react-profiler-report/karma
430434
test_regressions:
431-
<<: *defaults
435+
<<: *default-job
432436
docker:
433437
- image: mcr.microsoft.com/playwright:v1.42.1-focal
434438
environment:
@@ -444,7 +448,7 @@ jobs:
444448
name: Upload screenshots to Argos CI
445449
command: pnpm test:argos
446450
test_bundling_prepare:
447-
<<: *defaults
451+
<<: *default-job
448452
steps:
449453
- checkout
450454
- install_js
@@ -457,7 +461,7 @@ jobs:
457461
- '*/build'
458462

459463
test_bundling_node-esm:
460-
<<: *defaults
464+
<<: *default-job
461465
working_directory: /tmp/material-ui/test/bundling/fixtures/node-esm/
462466
steps:
463467
- checkout:
@@ -481,7 +485,7 @@ jobs:
481485
pnpm start
482486
exit 0
483487
test_bundling_next-webpack4:
484-
<<: *defaults
488+
<<: *default-job
485489
working_directory: /tmp/material-ui/test/bundling/fixtures/next-webpack4/
486490
docker:
487491
- image: mcr.microsoft.com/playwright:v1.42.1-focal
@@ -505,7 +509,7 @@ jobs:
505509
name: Test fixture
506510
command: pnpm start
507511
test_bundling_next-webpack5:
508-
<<: *defaults
512+
<<: *default-job
509513
working_directory: /tmp/material-ui/test/bundling/fixtures/next-webpack5/
510514
docker:
511515
- image: mcr.microsoft.com/playwright:v1.42.1-focal
@@ -529,7 +533,7 @@ jobs:
529533
name: Test fixture
530534
command: pnpm start
531535
test_bundling_create-react-app:
532-
<<: *defaults
536+
<<: *default-job
533537
working_directory: /tmp/material-ui/test/bundling/fixtures/create-react-app/
534538
docker:
535539
- image: mcr.microsoft.com/playwright:v1.42.1-focal
@@ -553,7 +557,7 @@ jobs:
553557
name: Test fixture
554558
command: pnpm start
555559
test_bundling_snowpack:
556-
<<: *defaults
560+
<<: *default-job
557561
working_directory: /tmp/material-ui/test/bundling/fixtures/snowpack/
558562
docker:
559563
- image: mcr.microsoft.com/playwright:v1.42.1-focal
@@ -577,7 +581,7 @@ jobs:
577581
name: Test fixture
578582
command: pnpm start
579583
test_bundling_vite:
580-
<<: *defaults
584+
<<: *default-job
581585
working_directory: /tmp/material-ui/test/bundling/fixtures/vite/
582586
docker:
583587
- image: mcr.microsoft.com/playwright:v1.42.1-focal
@@ -601,7 +605,7 @@ jobs:
601605
name: Test fixture
602606
command: pnpm start
603607
test_bundling_esbuild:
604-
<<: *defaults
608+
<<: *default-job
605609
working_directory: /tmp/material-ui/test/bundling/fixtures/esbuild/
606610
docker:
607611
- image: mcr.microsoft.com/playwright:v1.42.1-focal
@@ -629,7 +633,7 @@ jobs:
629633
pnpm start
630634
exit 0
631635
test_bundling_gatsby:
632-
<<: *defaults
636+
<<: *default-job
633637
working_directory: /tmp/material-ui/test/bundling/fixtures/gatsby/
634638
docker:
635639
- image: mcr.microsoft.com/playwright:v1.42.1-focal
@@ -652,7 +656,7 @@ jobs:
652656
name: Test fixture
653657
command: pnpm start
654658
test_bundle_size_monitor:
655-
<<: *defaults
659+
<<: *default-job
656660
steps:
657661
- checkout
658662
- install_js
@@ -731,7 +735,7 @@ jobs:
731735
environment:
732736
DANGER_COMMAND: 'reportBundleSize'
733737
test_benchmark:
734-
<<: *defaults
738+
<<: *default-job
735739
docker:
736740
- image: mcr.microsoft.com/playwright:v1.42.1-focal
737741
environment:
@@ -753,27 +757,35 @@ workflows:
753757
jobs:
754758
- checkout
755759
- test_unit:
760+
<<: *default-context
756761
requires:
757762
- checkout
758763
- test_lint:
764+
<<: *default-context
759765
requires:
760766
- checkout
761767
- test_static:
768+
<<: *default-context
762769
requires:
763770
- checkout
764771
- test_types:
772+
<<: *default-context
765773
requires:
766774
- checkout
767775
- test_browser:
776+
<<: *default-context
768777
requires:
769778
- checkout
770779
- test_regressions:
780+
<<: *default-context
771781
requires:
772782
- checkout
773783
- test_e2e:
784+
<<: *default-context
774785
requires:
775786
- checkout
776787
- test_bundle_size_monitor:
788+
<<: *default-context
777789
requires:
778790
- checkout
779791
e2e-website:
@@ -782,6 +794,7 @@ workflows:
782794
jobs:
783795
- checkout
784796
- test_e2e_website:
797+
<<: *default-context
785798
requires:
786799
- checkout
787800

0 commit comments

Comments
 (0)