@@ -8,7 +8,6 @@ executors:
8
8
node :
9
9
docker :
10
10
- image : mcr.microsoft.com/playwright:v1.53.1-noble
11
- resource_class : xlarge
12
11
environment :
13
12
NODE_ENV : development
14
13
AZCOPY_AUTO_LOGIN_TYPE : SPN
@@ -48,22 +47,24 @@ commands:
48
47
echo 'export AZCOPY_TENANT_ID="$AZURE_TENANT_ID"' >> $BASH_ENV
49
48
source $BASH_ENV
50
49
azcopy --version
51
- downstream :
50
+ setup-project :
52
51
steps :
53
52
- checkout
54
- # - restore_cache:
55
- # keys:
56
- # - v4c-dependencies-{{ arch }}-{{ checksum "yarn.lock" }}
57
- # - restore_cache:
58
- # keys:
59
- # - v4b-<< pipeline.parameters.wireit_cache_name >>-{{ arch }}-{{ checksum "package.json" }}-
53
+ - restore_cache :
54
+ keys :
55
+ - v4c-dependencies-{{ arch }}-{{ checksum "yarn.lock" }}
56
+ - v4c-dependencies-{{ arch }}-
57
+ - restore_cache :
58
+ keys :
59
+ - v4b-<< pipeline.parameters.wireit_cache_name >>-{{ arch }}-{{ checksum "package.json" }}-
60
+ - v4b-<< pipeline.parameters.wireit_cache_name >>-{{ arch }}-
60
61
- run :
61
- name : Installing Dependencies
62
+ name : Installing dependencies
62
63
command : |
63
64
corepack enable
64
65
yarn --immutable
65
66
- run :
66
- name : Build the project
67
+ name : Build project
67
68
command : yarn build
68
69
69
70
- save_cache :
@@ -74,9 +75,52 @@ commands:
74
75
- save_cache :
75
76
paths :
76
77
- .wireit
77
- key : v4b-wireit -{{ arch }}-{{ checksum "package.json" }}-{{ epoch }}
78
+ key : v4b-<< pipeline.parameters.wireit_cache_name >> -{{ arch }}-{{ checksum "package.json" }}-{{ epoch }}
78
79
- attach_workspace :
79
80
at : /
81
+
82
+ run-tests :
83
+ description : ' Run tests with CircleCI test splitting'
84
+ parameters :
85
+ config_file :
86
+ type : string
87
+ test_patterns :
88
+ type : string
89
+ exclude_pattern :
90
+ type : string
91
+ default : ' '
92
+ steps :
93
+ - run :
94
+ name : Run tests
95
+ command : |
96
+ mkdir -p /root/project/results
97
+ # Get test files using proper space-separated patterns
98
+ TEST_FILES=$(circleci tests glob << parameters.test_patterns >>)
99
+ # Apply exclusions if specified and not empty
100
+ EXCLUDE_PATTERN="<< parameters.exclude_pattern >>"
101
+ if [ -n "$EXCLUDE_PATTERN" ] && [ "$EXCLUDE_PATTERN" != "" ]; then
102
+ echo "Applying exclude pattern: $EXCLUDE_PATTERN"
103
+ TEST_FILES=$(echo "$TEST_FILES" | grep -v -E "$EXCLUDE_PATTERN")
104
+ fi
105
+ # Check if we have any test files left
106
+ if [ -z "$TEST_FILES" ]; then
107
+ echo "No test files found after filtering"
108
+ exit 1
109
+ fi
110
+ # Debug output
111
+ echo "Test files to run:"
112
+ echo "$TEST_FILES"
113
+ # Run tests with CircleCI splitting
114
+ echo "$TEST_FILES" | circleci tests run \
115
+ --command="xargs yarn test:start --files --config << parameters.config_file >>" \
116
+ --split-by=timings \
117
+ --verbose
118
+ - store_test_results :
119
+ path : /root/project/results/
120
+ - store_artifacts :
121
+ path : /root/project/results/
122
+ destination : test-results
123
+
80
124
run-regressions :
81
125
parameters :
82
126
regression_system :
@@ -205,79 +249,72 @@ commands:
205
249
key : v2-golden-images-{{ .Branch }}-<< parameters.regression_system >>-<< parameters.regression_color >>-<< parameters.regression_scale >>-<< parameters.regression_dir >>-{{ epoch }}
206
250
207
251
jobs :
252
+ lint :
253
+ executor : node
254
+ resource_class : medium
255
+ steps :
256
+ - setup-project
257
+ - run :
258
+ name : Lint
259
+ command : yarn lint
260
+ - run :
261
+ name : Check for changes
262
+ command : git diff-files --exit-code
263
+
208
264
test-chromium :
209
265
executor : node
210
266
parallelism : 5
267
+ resource_class : large
211
268
212
269
steps :
213
- - downstream
214
- - run :
215
- name : Run unit tests
216
- command : |
217
- TEST=$(circleci tests glob packages/*/test/*.test.js | circleci tests split --split-by=timings)
218
- yarn test:start --files $TEST --config web-test-runner.config.ci-chromium.js --group no-memory-ci
219
- - store_test_results :
220
- path : /root/project/results/
270
+ - setup-project
271
+ - run-tests :
272
+ config_file : web-test-runner.config.ci-chromium.js
273
+ test_patterns : ' packages/*/test/*.test.js tools/*/test/*.test.js'
274
+ exclude_pattern : ' memory\.test\.js'
221
275
222
276
test-chromium-memory :
223
277
executor : node
224
278
parallelism : 5
279
+ resource_class : xlarge
225
280
226
281
steps :
227
- - downstream
228
- - run :
229
- name : Run memory tests
230
- command : |
231
- TEST=$(circleci tests glob packages/*/test/*.test.js | circleci tests split --split-by=timings)
232
- yarn test:start --files $TEST --config web-test-runner.config.ci-chromium.js --group memory-ci
233
- - store_test_results :
234
- path : /root/project/results/
282
+ - setup-project
283
+ - run-tests :
284
+ config_file : web-test-runner.config.ci-chromium.js
285
+ test_patterns : ' packages/**/*-memory.test.js tools/**/*-memory.test.js'
286
+ exclude_pattern : ' color-area|color-wheel|color-slider|color-loupe|color-handle'
235
287
236
288
test-firefox :
237
289
executor : node
238
290
parallelism : 5
291
+ resource_class : large
239
292
240
293
steps :
241
- - downstream
242
- - run :
243
- name : Run tests
244
- command : |
245
- TEST=$(circleci tests glob packages/*/test/*.test.js | circleci tests split --split-by=timings)
246
- yarn test:start --files $TEST --config web-test-runner.config.ci-firefox.js --group no-memory-ci
247
- - store_test_results :
248
- path : /root/project/results/
294
+ - setup-project
295
+ - run-tests :
296
+ config_file : web-test-runner.config.ci-firefox.js
297
+ test_patterns : ' packages/*/test/*.test.js tools/*/test/*.test.js'
298
+ exclude_pattern : ' memory\.test\.js'
249
299
250
300
test-webkit :
251
301
executor : node
252
302
parallelism : 5
303
+ resource_class : large
253
304
254
305
steps :
255
- - downstream
256
- - run :
257
- name : Run tests
258
- command : |
259
- TEST=$(circleci tests glob packages/*/test/*.test.js | circleci tests split --split-by=timings)
260
- yarn test:start --files $TEST --config web-test-runner.config.ci-webkit.js --group no-memory-ci
261
- - store_test_results :
262
- path : /root/project/results/
263
-
264
- lint :
265
- executor : node
266
-
267
- steps :
268
- - downstream
269
- - run :
270
- name : Lint
271
- command : yarn lint
272
- - run :
273
- name : Are there changes?
274
- command : git diff-files --exit-code
306
+ - setup-project
307
+ - run-tests :
308
+ config_file : web-test-runner.config.ci-webkit.js
309
+ test_patterns : ' packages/*/test/*.test.js tools/*/test/*.test.js'
310
+ exclude_pattern : ' memory\.test\.js'
275
311
276
312
beta-docs :
277
313
executor : node
314
+ resource_class : medium
278
315
279
316
steps :
280
- - downstream
317
+ - setup-project
281
318
- run :
282
319
name : Generate Custom Elements Manifest
283
320
command : yarn docs:analyze
@@ -319,9 +356,10 @@ jobs:
319
356
320
357
hcm-visual :
321
358
executor : node
359
+ resource_class : xlarge
322
360
323
361
steps :
324
- - downstream
362
+ - setup-project
325
363
- restore_cache :
326
364
name : Restore Golden Images Cache
327
365
keys :
@@ -435,6 +473,7 @@ jobs:
435
473
436
474
visual :
437
475
executor : node
476
+ resource_class : xlarge
438
477
parameters :
439
478
system :
440
479
type : string
@@ -445,7 +484,7 @@ jobs:
445
484
dir :
446
485
type : string
447
486
steps :
448
- - downstream
487
+ - setup-project
449
488
- run-regressions :
450
489
regression_system : << parameters.system >>
451
490
regression_color : << parameters.color >>
@@ -455,11 +494,17 @@ jobs:
455
494
workflows :
456
495
build :
457
496
jobs :
458
- - test-chromium
459
- - test-chromium-memory
460
- - test-firefox
461
- - test-webkit
497
+ - lint
498
+ - test-chromium :
499
+ requires : [lint]
500
+ - test-chromium-memory :
501
+ requires : [lint]
502
+ - test-firefox :
503
+ requires : [lint]
504
+ - test-webkit :
505
+ requires : [lint]
462
506
- hcm-visual :
507
+ requires : [lint]
463
508
filters :
464
509
branches :
465
510
# Forked pull requests have CIRCLE_BRANCH set to pull/XXX
@@ -470,6 +515,7 @@ workflows:
470
515
# Beta docs are only published from main
471
516
only : main
472
517
- visual :
518
+ requires : [lint]
473
519
name : << matrix.system >>-<< matrix.color >>-<< matrix.scale >>-<< matrix.dir >>
474
520
matrix :
475
521
parameters :
@@ -482,6 +528,7 @@ workflows:
482
528
# Forked pull requests have CIRCLE_BRANCH set to pull/XXX
483
529
ignore : /pull\/[0-9]+/
484
530
- visual :
531
+ requires : [lint]
485
532
name : << matrix.system >>-<< matrix.color >>-<< matrix.scale >>-<< matrix.dir >>
486
533
matrix :
487
534
parameters :
0 commit comments