@@ -22,6 +22,11 @@ permissions:
2222 contents : read
2323 pull-requests : write
2424
25+ # pnpm deps: rely on actions/setup-node cache: pnpm (content-addressable store, keyed on
26+ # pnpm-lock.yaml). Always run pnpm install --frozen-lockfile in each job — with a warm store
27+ # it is mostly linking. Caching only the repo-root node_modules tarball omits workspace
28+ # package node_modules symlinks and breaks tsc/vite in toolkit and deploy/tools/* packages.
29+
2530jobs :
2631 code_quality :
2732 name : Code quality
@@ -35,29 +40,17 @@ jobs:
3540 uses : pnpm/action-setup@v4
3641 with :
3742 version : 10.32.1
43+ cache : true
3844
3945 - name : Setup node
4046 uses : actions/setup-node@v4
4147 with :
4248 node-version : 22.14.0
4349 cache : ' pnpm'
4450
45- - name : Cache node_modules
46- uses : actions/cache@v4
47- id : cache-node-modules
48- with :
49- path : |
50- node_modules
51- key : node_modules-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
52-
5351 - name : Install dependencies
54- if : steps.cache-node-modules.outputs.cache-hit != 'true'
5552 run : pnpm install --frozen-lockfile
5653
57- - name : Generate Chakra types
58- if : steps.cache-node-modules.outputs.cache-hit == 'true'
59- run : pnpm chakra:typegen
60-
6154 - name : Run ESLint
6255 run : pnpm lint:eslint
6356
@@ -82,29 +75,17 @@ jobs:
8275 uses : pnpm/action-setup@v4
8376 with :
8477 version : 10.32.1
78+ cache : true
8579
8680 - name : Setup node
8781 uses : actions/setup-node@v4
8882 with :
8983 node-version : 22.14.0
9084 cache : ' pnpm'
9185
92- - name : Cache node_modules
93- uses : actions/cache@v4
94- id : cache-node-modules
95- with :
96- path : |
97- node_modules
98- key : node_modules-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
99-
10086 - name : Install project dependencies
101- if : steps.cache-node-modules.outputs.cache-hit != 'true'
10287 run : pnpm install --frozen-lockfile
10388
104- - name : Generate Chakra types
105- if : steps.cache-node-modules.outputs.cache-hit == 'true'
106- run : pnpm chakra:typegen
107-
10889 - name : Type check the package
10990 run : pnpm --filter @blockscout/ui-toolkit typecheck
11091
@@ -141,36 +122,19 @@ jobs:
141122 uses : pnpm/action-setup@v4
142123 with :
143124 version : 10.32.1
125+ cache : true
144126
145127 - name : Setup node
146128 uses : actions/setup-node@v4
147129 with :
148130 node-version : 22.14.0
149131 cache : ' pnpm'
150132
151- - name : Cache node_modules
152- uses : actions/cache@v4
153- id : cache-node-modules
154- with :
155- path : |
156- node_modules
157- key : node_modules-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
158-
159133 - name : Install dependencies
160- if : steps.cache-node-modules.outputs.cache-hit != 'true'
161134 run : pnpm install --frozen-lockfile
162135
163- - name : Generate Chakra types
164- if : steps.cache-node-modules.outputs.cache-hit == 'true'
165- run : pnpm chakra:typegen
166-
167136 - name : Run validation tests
168- run : |
169- set +e
170- pnpm --filter envs-validator test
171- exitcode="$?"
172- echo "exitcode=$exitcode" >> $GITHUB_OUTPUT
173- exit "$exitcode"
137+ run : pnpm --filter envs-validator test
174138
175139 vitest_tests :
176140 name : Unit tests
@@ -186,29 +150,17 @@ jobs:
186150 uses : pnpm/action-setup@v4
187151 with :
188152 version : 10.32.1
153+ cache : true
189154
190155 - name : Setup node
191156 uses : actions/setup-node@v4
192157 with :
193158 node-version : 22.14.0
194159 cache : ' pnpm'
195160
196- - name : Cache node_modules
197- uses : actions/cache@v4
198- id : cache-node-modules
199- with :
200- path : |
201- node_modules
202- key : node_modules-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
203-
204161 - name : Install dependencies
205- if : steps.cache-node-modules.outputs.cache-hit != 'true'
206162 run : pnpm install --frozen-lockfile
207163
208- - name : Generate Chakra types
209- if : steps.cache-node-modules.outputs.cache-hit == 'true'
210- run : pnpm chakra:typegen
211-
212164 - name : Run Vitest
213165 run : pnpm test:vitest ${{ github.event_name == 'pull_request' && '--changed=origin/main' || '' }} --passWithNoTests
214166
@@ -227,29 +179,17 @@ jobs:
227179 uses : pnpm/action-setup@v4
228180 with :
229181 version : 10.32.1
182+ cache : true
230183
231184 - name : Setup node
232185 uses : actions/setup-node@v4
233186 with :
234187 node-version : 22.14.0
235188 cache : ' pnpm'
236189
237- - name : Cache node_modules
238- uses : actions/cache@v4
239- id : cache-node-modules
240- with :
241- path : |
242- node_modules
243- key : node_modules-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
244-
245190 - name : Install dependencies
246- if : steps.cache-node-modules.outputs.cache-hit != 'true'
247191 run : pnpm install --frozen-lockfile
248192
249- - name : Generate Chakra types
250- if : steps.cache-node-modules.outputs.cache-hit == 'true'
251- run : pnpm chakra:typegen
252-
253193 - name : Run script
254194 run : pnpm test:pw:detect-affected
255195
@@ -290,29 +230,17 @@ jobs:
290230 uses : pnpm/action-setup@v4
291231 with :
292232 version : 10.32.1
233+ cache : true
293234
294235 - name : Setup node
295236 uses : actions/setup-node@v4
296237 with :
297238 node-version : 22.14.0
298239 cache : ' pnpm'
299240
300- - name : Cache node_modules
301- uses : actions/cache@v4
302- id : cache-node-modules
303- with :
304- path : |
305- node_modules
306- key : node_modules-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
307-
308241 - name : Install dependencies
309- if : steps.cache-node-modules.outputs.cache-hit != 'true'
310242 run : pnpm install --frozen-lockfile
311243
312- - name : Generate Chakra types
313- if : steps.cache-node-modules.outputs.cache-hit == 'true'
314- run : pnpm chakra:typegen
315-
316244 - name : Download affected tests list
317245 if : ${{ needs.pw_affected_tests.result == 'success' }}
318246 uses : actions/download-artifact@v5
@@ -369,6 +297,7 @@ jobs:
369297 uses : pnpm/action-setup@v4
370298 with :
371299 version : 10.32.1
300+ cache : true
372301
373302 - name : Setup node
374303 if : steps.check-reports.outputs.has_reports == 'true'
@@ -377,17 +306,8 @@ jobs:
377306 node-version : 22.14.0
378307 cache : ' pnpm'
379308
380- - name : Cache node_modules
381- if : steps.check-reports.outputs.has_reports == 'true'
382- uses : actions/cache@v4
383- id : cache-node-modules
384- with :
385- path : |
386- node_modules
387- key : node_modules-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
388-
389309 - name : Install dependencies
390- if : steps.check-reports.outputs.has_reports == 'true' && steps.cache-node-modules.outputs.cache-hit != 'true'
310+ if : steps.check-reports.outputs.has_reports == 'true'
391311 run : pnpm install --frozen-lockfile
392312
393313 - name : Merge into HTML Report
0 commit comments