44 test :
55 docker :
66 - image : cimg/node:lts-browsers
7-
87 working_directory : ~/repo
98 resource_class : large
109 steps :
1110 - checkout
1211
13- # Download and cache dependencies
12+ - run :
13+ name : Yarn version
14+ command : yarn --version
15+
16+ # Download and cache dependencies (Yarn artifacts, not node_modules)
1417 - restore_cache :
1518 keys :
16- - v1-dependencies-{{ checksum "package.json" }}
17- # fallback to using the latest cache if no exact match is found
18- - v1-dependencies-
19+ - v3-yarn-{{ checksum "yarn.lock" }}
20+ - v3-yarn-
21+ - run :
22+ name : Install dependencies (immutable)
23+ command : yarn install --immutable
24+ - save_cache :
25+ paths :
26+ - .yarn/cache
27+ - .yarn/releases
28+ - .yarn/plugins
29+ - .yarn/patches
30+ key : v3-yarn-{{ checksum "yarn.lock" }}
1931
2032 - run :
2133 name : Test Jest
@@ -24,27 +36,33 @@ jobs:
2436 - store_test_results :
2537 path : test_reports
2638
27- - save_cache :
28- paths :
29- - node_modules
30- key : v1-dependencies-{{ checksum "package.json" }}
31-
3239 test-react :
3340 docker :
3441 - image : cimg/node:lts-browsers
35-
3642 working_directory : ~/repo
3743 parallelism : 6
3844 resource_class : large
3945 steps :
4046 - checkout
4147
42- # Download and cache dependencies
48+ - run :
49+ name : Yarn version
50+ command : yarn --version
51+
4352 - restore_cache :
4453 keys :
45- - v1-dependencies-{{ checksum "package.json" }}
46- # fallback to using the latest cache if no exact match is found
47- - v1-dependencies-
54+ - v3-yarn-{{ checksum "yarn.lock" }}
55+ - v3-yarn-
56+ - run :
57+ name : Install dependencies (immutable)
58+ command : yarn install --immutable
59+ - save_cache :
60+ paths :
61+ - .yarn/cache
62+ - .yarn/releases
63+ - .yarn/plugins
64+ - .yarn/patches
65+ key : v3-yarn-{{ checksum "yarn.lock" }}
4866
4967 - run :
5068 name : React tests
@@ -55,27 +73,33 @@ jobs:
5573 - store_test_results :
5674 path : test_reports
5775
58- - save_cache :
59- paths :
60- - node_modules
61- key : v1-dependencies-{{ checksum "package.json" }}
62-
6376 test-react-19 :
6477 docker :
6578 - image : cimg/node:lts-browsers
66-
6779 working_directory : ~/repo
6880 parallelism : 6
6981 resource_class : large
7082 steps :
7183 - checkout
7284
73- # Download and cache dependencies
85+ - run :
86+ name : Yarn version
87+ command : yarn --version
88+
7489 - restore_cache :
7590 keys :
76- - v1-dependencies-{{ checksum "package.json" }}
77- # fallback to using the latest cache if no exact match is found
78- - v1-dependencies-
91+ - v3-yarn-{{ checksum "yarn.lock" }}
92+ - v3-yarn-
93+ - run :
94+ name : Install dependencies (immutable)
95+ command : yarn install --immutable
96+ - save_cache :
97+ paths :
98+ - .yarn/cache
99+ - .yarn/releases
100+ - .yarn/plugins
101+ - .yarn/patches
102+ key : v3-yarn-{{ checksum "yarn.lock" }}
79103
80104 - run :
81105 name : React tests
@@ -86,11 +110,6 @@ jobs:
86110 - store_test_results :
87111 path : test_reports
88112
89- - save_cache :
90- paths :
91- - node_modules
92- key : v1-dependencies-{{ checksum "package.json" }}
93-
94113 test-html :
95114 docker :
96115 - image : cimg/node:lts-browsers
@@ -99,12 +118,24 @@ jobs:
99118 steps :
100119 - checkout
101120
102- # Download and cache dependencies
121+ - run :
122+ name : Yarn version
123+ command : yarn --version
124+
103125 - restore_cache :
104126 keys :
105- - v1-dependencies-{{ checksum "package.json" }}
106- # fallback to using the latest cache if no exact match is found
107- - v1-dependencies-
127+ - v3-yarn-{{ checksum "yarn.lock" }}
128+ - v3-yarn-
129+ - run :
130+ name : Install dependencies (immutable)
131+ command : yarn install --immutable
132+ - save_cache :
133+ paths :
134+ - .yarn/cache
135+ - .yarn/releases
136+ - .yarn/plugins
137+ - .yarn/patches
138+ key : v3-yarn-{{ checksum "yarn.lock" }}
108139
109140 - run :
110141 name : HTML tests
@@ -121,11 +152,6 @@ jobs:
121152 - store_test_results :
122153 path : test_reports
123154
124- - save_cache :
125- paths :
126- - node_modules
127- key : v1-dependencies-{{ checksum "package.json" }}
128-
129155 test-playwright :
130156 docker :
131157 - image : mcr.microsoft.com/playwright:v1.51.1-noble
@@ -134,27 +160,34 @@ jobs:
134160 steps :
135161 - checkout
136162
137- # Download and cache dependencies
163+ - run :
164+ name : Yarn version
165+ command : yarn --version
166+
138167 - restore_cache :
139168 keys :
140- - v1-dependencies-{{ checksum "package.json" }}
141- # fallback to using the latest cache if no exact match is found
142- - v1-dependencies-
169+ - v3-yarn-{{ checksum "yarn.lock" }}
170+ - v3-yarn-
171+ - run :
172+ name : Install dependencies (immutable)
173+ command : yarn install --immutable
174+ - save_cache :
175+ paths :
176+ - .yarn/cache
177+ - .yarn/releases
178+ - .yarn/plugins
179+ - .yarn/patches
180+ key : v3-yarn-{{ checksum "yarn.lock" }}
143181
144182 - run :
145183 name : Playwright tests
146- command : yarn && yarn test-playwright
184+ command : yarn test-playwright
147185 environment :
148186 JEST_JUNIT_OUTPUT : test_reports/framer-motion-playwright.xml
149187
150188 - store_test_results :
151189 path : test_reports
152190
153- - save_cache :
154- paths :
155- - node_modules
156- key : v1-dependencies-{{ checksum "package.json" }}
157-
158191workflows :
159192 version : 2
160193 build :
0 commit comments