Skip to content

Commit 7ab3511

Browse files
committed
Attempting to fix CI tests
1 parent fdc2c04 commit 7ab3511

File tree

1 file changed

+98
-49
lines changed

1 file changed

+98
-49
lines changed

.circleci/config.yml

Lines changed: 98 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,34 @@ jobs:
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+
# Corepack + Yarn version (optional but useful for logs)
13+
- run:
14+
name: Enable Corepack
15+
command: corepack enable
16+
- run:
17+
name: Yarn version
18+
command: yarn --version
19+
20+
# Download and cache dependencies (Yarn artifacts, not node_modules)
1421
- restore_cache:
1522
keys:
16-
- v1-dependencies-{{ checksum "package.json" }}
17-
# fallback to using the latest cache if no exact match is found
18-
- v1-dependencies-
23+
- v3-yarn-{{ checksum "yarn.lock" }}
24+
- v3-yarn-
25+
- run:
26+
name: Install dependencies (immutable)
27+
command: yarn install --immutable
28+
- save_cache:
29+
paths:
30+
- .yarn/cache
31+
- .yarn/releases
32+
- .yarn/plugins
33+
- .yarn/patches
34+
key: v3-yarn-{{ checksum "yarn.lock" }}
1935

2036
- run:
2137
name: Test Jest
@@ -24,27 +40,36 @@ jobs:
2440
- store_test_results:
2541
path: test_reports
2642

27-
- save_cache:
28-
paths:
29-
- node_modules
30-
key: v1-dependencies-{{ checksum "package.json" }}
31-
3243
test-react:
3344
docker:
3445
- image: cimg/node:lts-browsers
35-
3646
working_directory: ~/repo
3747
parallelism: 6
3848
resource_class: large
3949
steps:
4050
- checkout
4151

42-
# Download and cache dependencies
52+
- run:
53+
name: Enable Corepack
54+
command: corepack enable
55+
- run:
56+
name: Yarn version
57+
command: yarn --version
58+
4359
- restore_cache:
4460
keys:
45-
- v1-dependencies-{{ checksum "package.json" }}
46-
# fallback to using the latest cache if no exact match is found
47-
- v1-dependencies-
61+
- v3-yarn-{{ checksum "yarn.lock" }}
62+
- v3-yarn-
63+
- run:
64+
name: Install dependencies (immutable)
65+
command: yarn install --immutable
66+
- save_cache:
67+
paths:
68+
- .yarn/cache
69+
- .yarn/releases
70+
- .yarn/plugins
71+
- .yarn/patches
72+
key: v3-yarn-{{ checksum "yarn.lock" }}
4873

4974
- run:
5075
name: React tests
@@ -55,27 +80,36 @@ jobs:
5580
- store_test_results:
5681
path: test_reports
5782

58-
- save_cache:
59-
paths:
60-
- node_modules
61-
key: v1-dependencies-{{ checksum "package.json" }}
62-
6383
test-react-19:
6484
docker:
6585
- image: cimg/node:lts-browsers
66-
6786
working_directory: ~/repo
6887
parallelism: 6
6988
resource_class: large
7089
steps:
7190
- checkout
7291

73-
# Download and cache dependencies
92+
- run:
93+
name: Enable Corepack
94+
command: corepack enable
95+
- run:
96+
name: Yarn version
97+
command: yarn --version
98+
7499
- restore_cache:
75100
keys:
76-
- v1-dependencies-{{ checksum "package.json" }}
77-
# fallback to using the latest cache if no exact match is found
78-
- v1-dependencies-
101+
- v3-yarn-{{ checksum "yarn.lock" }}
102+
- v3-yarn-
103+
- run:
104+
name: Install dependencies (immutable)
105+
command: yarn install --immutable
106+
- save_cache:
107+
paths:
108+
- .yarn/cache
109+
- .yarn/releases
110+
- .yarn/plugins
111+
- .yarn/patches
112+
key: v3-yarn-{{ checksum "yarn.lock" }}
79113

80114
- run:
81115
name: React tests
@@ -86,11 +120,6 @@ jobs:
86120
- store_test_results:
87121
path: test_reports
88122

89-
- save_cache:
90-
paths:
91-
- node_modules
92-
key: v1-dependencies-{{ checksum "package.json" }}
93-
94123
test-html:
95124
docker:
96125
- image: cimg/node:lts-browsers
@@ -99,12 +128,27 @@ jobs:
99128
steps:
100129
- checkout
101130

102-
# Download and cache dependencies
131+
- run:
132+
name: Enable Corepack
133+
command: corepack enable
134+
- run:
135+
name: Yarn version
136+
command: yarn --version
137+
103138
- restore_cache:
104139
keys:
105-
- v1-dependencies-{{ checksum "package.json" }}
106-
# fallback to using the latest cache if no exact match is found
107-
- v1-dependencies-
140+
- v3-yarn-{{ checksum "yarn.lock" }}
141+
- v3-yarn-
142+
- run:
143+
name: Install dependencies (immutable)
144+
command: yarn install --immutable
145+
- save_cache:
146+
paths:
147+
- .yarn/cache
148+
- .yarn/releases
149+
- .yarn/plugins
150+
- .yarn/patches
151+
key: v3-yarn-{{ checksum "yarn.lock" }}
108152

109153
- run:
110154
name: HTML tests
@@ -121,11 +165,6 @@ jobs:
121165
- store_test_results:
122166
path: test_reports
123167

124-
- save_cache:
125-
paths:
126-
- node_modules
127-
key: v1-dependencies-{{ checksum "package.json" }}
128-
129168
test-playwright:
130169
docker:
131170
- image: mcr.microsoft.com/playwright:v1.51.1-noble
@@ -134,27 +173,37 @@ jobs:
134173
steps:
135174
- checkout
136175

137-
# Download and cache dependencies
176+
- run:
177+
name: Enable Corepack
178+
command: corepack enable
179+
- run:
180+
name: Yarn version
181+
command: yarn --version
182+
138183
- restore_cache:
139184
keys:
140-
- v1-dependencies-{{ checksum "package.json" }}
141-
# fallback to using the latest cache if no exact match is found
142-
- v1-dependencies-
185+
- v3-yarn-{{ checksum "yarn.lock" }}
186+
- v3-yarn-
187+
- run:
188+
name: Install dependencies (immutable)
189+
command: yarn install --immutable
190+
- save_cache:
191+
paths:
192+
- .yarn/cache
193+
- .yarn/releases
194+
- .yarn/plugins
195+
- .yarn/patches
196+
key: v3-yarn-{{ checksum "yarn.lock" }}
143197

144198
- run:
145199
name: Playwright tests
146-
command: yarn && yarn test-playwright
200+
command: yarn test-playwright
147201
environment:
148202
JEST_JUNIT_OUTPUT: test_reports/framer-motion-playwright.xml
149203

150204
- store_test_results:
151205
path: test_reports
152206

153-
- save_cache:
154-
paths:
155-
- node_modules
156-
key: v1-dependencies-{{ checksum "package.json" }}
157-
158207
workflows:
159208
version: 2
160209
build:

0 commit comments

Comments
 (0)