Skip to content

Commit c8e8869

Browse files
committed
review and workflow fixes
1 parent 293be01 commit c8e8869

File tree

5 files changed

+20
-97
lines changed

5 files changed

+20
-97
lines changed

.github/workflows/checks.yml

Lines changed: 14 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
2530
jobs:
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

cspell.jsonc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@
264264
"VEVENT",
265265
"viem",
266266
"vitalik",
267+
"vite",
267268
"vitest",
268269
"wagmi",
269270
"warpcast",

toolkit/components/truncation/TruncatedText.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import type { ExcludeUndefined } from 'types/utils';
66

77
import type { SkeletonTextProps } from '../../chakra/skeleton';
88
import { Skeleton } from '../../chakra/skeleton';
9-
import { Tooltip, type TooltipProps } from '../../chakra/tooltip';
9+
import type { TooltipProps } from '../../chakra/tooltip';
10+
import { Tooltip } from '../../chakra/tooltip';
1011
import { TruncatedTextTooltip } from './TruncatedTextTooltip';
1112

1213
export interface TruncatedTextProps extends Omit<SkeletonTextProps, 'loading'> {

toolkit/components/truncation/TruncatedTextTooltip.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import useFontFaceObserver from 'use-font-face-observer';
44

55
import type { ExcludeUndefined } from 'types/utils';
66

7-
import { Tooltip, type TooltipProps } from '../../chakra/tooltip';
7+
import type { TooltipProps } from '../../chakra/tooltip';
8+
import { Tooltip } from '../../chakra/tooltip';
89
import { useDisclosure } from '../../hooks/useDisclosure';
910
import { BODY_TYPEFACE } from '../../theme/foundations/typography';
1011

tools/scripts/pw.docker.deps.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ export npm_config_build_from_source=false
1818
export npm_config_prefer_offline=true
1919
export NODE_PATH=$(pwd)/node_modules_linux
2020

21-
pnpm install --modules-folder node_modules_linux
21+
pnpm install --modules-dir node_modules_linux

0 commit comments

Comments
 (0)