36
36
run : sudo ethtool -K eth0 tx off rx off
37
37
38
38
- uses : actions/checkout@v4
39
- with :
40
- fetch-depth : 25
41
39
- uses : dorny/paths-filter@v3
42
40
id : filter
43
41
with :
@@ -69,40 +67,14 @@ jobs:
69
67
runs-on : ubuntu-latest
70
68
steps :
71
69
- uses : actions/checkout@v4
72
- with :
73
- fetch-depth : 0
74
-
75
- # https://github.com/actions/virtual-environments/issues/1187
76
- - name : tune linux network
77
- run : sudo ethtool -K eth0 tx off rx off
78
70
79
- - name : Setup Node@${{ env.NODE_VERSION }}
80
- uses : actions/setup-node@v4
71
+ - name : Node setup
72
+ uses : ./.github/ actions/setup
81
73
with :
82
74
node-version : ${{ env.NODE_VERSION }}
75
+ pnpm-version : ${{ env.PNPM_VERSION }}
76
+ pnpm-install-cache-key : pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
83
77
84
- - name : Install pnpm
85
- uses : pnpm/action-setup@v4
86
- with :
87
- version : ${{ env.PNPM_VERSION }}
88
- run_install : false
89
-
90
- - name : Get pnpm store directory
91
- shell : bash
92
- run : |
93
- echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
94
-
95
- - name : Setup pnpm cache
96
- uses : actions/cache@v4
97
- timeout-minutes : 720
98
- with :
99
- path : ${{ env.STORE_PATH }}
100
- key : pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
101
- restore-keys : |
102
- pnpm-store-
103
- pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
104
-
105
- - run : pnpm install
106
78
- name : Lint staged
107
79
run : |
108
80
git diff --name-only --diff-filter=d origin/${GITHUB_BASE_REF}...${GITHUB_SHA}
@@ -115,47 +87,20 @@ jobs:
115
87
116
88
steps :
117
89
- uses : actions/checkout@v4
118
- with :
119
- fetch-depth : 25
120
90
121
- # https://github.com/actions/virtual-environments/issues/1187
122
- - name : tune linux network
123
- run : sudo ethtool -K eth0 tx off rx off
124
-
125
- - name : Setup Node@${{ env.NODE_VERSION }}
126
- uses : actions/setup-node@v4
91
+ - name : Node setup
92
+ uses : ./.github/actions/setup
127
93
with :
128
94
node-version : ${{ env.NODE_VERSION }}
95
+ pnpm-version : ${{ env.PNPM_VERSION }}
96
+ pnpm-install-cache-key : pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
129
97
130
- - name : Install pnpm
131
- uses : pnpm/action-setup@v4
132
- with :
133
- version : ${{ env.PNPM_VERSION }}
134
- run_install : false
135
-
136
- - name : Get pnpm store directory
137
- shell : bash
138
- run : |
139
- echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
140
-
141
- - name : Setup pnpm cache
142
- uses : actions/cache@v4
143
- timeout-minutes : 720
144
- with :
145
- path : ${{ env.STORE_PATH }}
146
- key : pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
147
- restore-keys : |
148
- pnpm-store-
149
- pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
150
-
151
- - run : pnpm install
152
98
- run : pnpm run build:all
153
99
env :
154
100
DO_NOT_TRACK : 1 # Disable Turbopack telemetry
155
101
156
102
- name : Cache build
157
103
uses : actions/cache@v4
158
- timeout-minutes : 10
159
104
with :
160
105
path : ./*
161
106
key : ${{ github.sha }}-${{ github.run_number }}
@@ -165,24 +110,19 @@ jobs:
165
110
needs : [changes, build]
166
111
if : ${{ needs.changes.outputs.needs_tests == 'true' }}
167
112
steps :
168
- # https://github.com/actions/virtual-environments/issues/1187
169
- - name : tune linux network
170
- run : sudo ethtool -K eth0 tx off rx off
113
+ - uses : actions/checkout@v4
171
114
172
- - name : Setup Node@${{ env.NODE_VERSION }}
173
- uses : actions/setup-node@v4
115
+ - name : Node setup
116
+ uses : ./.github/ actions/setup
174
117
with :
175
118
node-version : ${{ env.NODE_VERSION }}
176
-
177
- - name : Install pnpm
178
- uses : pnpm/action-setup@v4
179
- with :
180
- version : ${{ env.PNPM_VERSION }}
181
- run_install : false
119
+ pnpm-version : ${{ env.PNPM_VERSION }}
120
+ pnpm-run-install : false
121
+ pnpm-restore-cache : false # Full build is restored below
122
+ pnpm-install-cache-key : pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
182
123
183
124
- name : Restore build
184
125
uses : actions/cache@v4
185
- timeout-minutes : 10
186
126
with :
187
127
path : ./*
188
128
key : ${{ github.sha }}-${{ github.run_number }}
@@ -231,24 +171,21 @@ jobs:
231
171
232
172
steps :
233
173
- uses : actions/checkout@v4
234
- with :
235
- fetch-depth : 25
236
- # https://github.com/actions/virtual-environments/issues/1187
237
- - name : tune linux network
238
- run : sudo ethtool -K eth0 tx off rx off
239
174
240
- - name : Setup Node@${{ env.NODE_VERSION }}
241
- uses : actions/setup-node@v4
175
+ - name : Node setup
176
+ uses : ./.github/ actions/setup
242
177
with :
243
178
node-version : ${{ env.NODE_VERSION }}
179
+ pnpm-version : ${{ env.PNPM_VERSION }}
180
+ pnpm-run-install : false
181
+ pnpm-restore-cache : false # Full build is restored below
182
+ pnpm-install-cache-key : pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
244
183
245
- - name : Install pnpm
246
- uses : pnpm/action-setup @v4
184
+ - name : Restore build
185
+ uses : actions/cache @v4
247
186
with :
248
- version : ${{ env.PNPM_VERSION }}
249
- run_install : false
250
-
251
- - run : pnpm install
187
+ path : ./*
188
+ key : ${{ github.sha }}-${{ github.run_number }}
252
189
253
190
- name : Start LocalStack
254
191
run : pnpm docker:start
@@ -341,24 +278,19 @@ jobs:
341
278
env :
342
279
SUITE_NAME : ${{ matrix.suite }}
343
280
steps :
344
- # https://github.com/actions/virtual-environments/issues/1187
345
- - name : tune linux network
346
- run : sudo ethtool -K eth0 tx off rx off
281
+ - uses : actions/checkout@v4
347
282
348
- - name : Setup Node@${{ env.NODE_VERSION }}
349
- uses : actions/setup-node@v4
283
+ - name : Node setup
284
+ uses : ./.github/ actions/setup
350
285
with :
351
286
node-version : ${{ env.NODE_VERSION }}
352
-
353
- - name : Install pnpm
354
- uses : pnpm/action-setup@v4
355
- with :
356
- version : ${{ env.PNPM_VERSION }}
357
- run_install : false
287
+ pnpm-version : ${{ env.PNPM_VERSION }}
288
+ pnpm-run-install : false
289
+ pnpm-restore-cache : false # Full build is restored below
290
+ pnpm-install-cache-key : pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
358
291
359
292
- name : Restore build
360
293
uses : actions/cache@v4
361
- timeout-minutes : 10
362
294
with :
363
295
path : ./*
364
296
key : ${{ github.sha }}-${{ github.run_number }}
@@ -449,24 +381,19 @@ jobs:
449
381
POSTGRES_DB : payloadtests
450
382
451
383
steps :
452
- # https://github.com/actions/virtual-environments/issues/1187
453
- - name : tune linux network
454
- run : sudo ethtool -K eth0 tx off rx off
384
+ - uses : actions/checkout@v4
455
385
456
- - name : Setup Node@${{ env.NODE_VERSION }}
457
- uses : actions/setup-node@v4
386
+ - name : Node setup
387
+ uses : ./.github/ actions/setup
458
388
with :
459
389
node-version : ${{ env.NODE_VERSION }}
460
-
461
- - name : Install pnpm
462
- uses : pnpm/action-setup@v4
463
- with :
464
- version : ${{ env.PNPM_VERSION }}
465
- run_install : false
390
+ pnpm-version : ${{ env.PNPM_VERSION }}
391
+ pnpm-run-install : false
392
+ pnpm-restore-cache : false # Full build is restored below
393
+ pnpm-install-cache-key : pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
466
394
467
395
- name : Restore build
468
396
uses : actions/cache@v4
469
- timeout-minutes : 10
470
397
with :
471
398
path : ./*
472
399
key : ${{ github.sha }}-${{ github.run_number }}
@@ -506,24 +433,19 @@ jobs:
506
433
needs : [changes, build]
507
434
if : ${{ needs.changes.outputs.needs_tests == 'true' }}
508
435
steps :
509
- # https://github.com/actions/virtual-environments/issues/1187
510
- - name : tune linux network
511
- run : sudo ethtool -K eth0 tx off rx off
436
+ - uses : actions/checkout@v4
512
437
513
- - name : Setup Node@${{ env.NODE_VERSION }}
514
- uses : actions/setup-node@v4
438
+ - name : Node setup
439
+ uses : ./.github/ actions/setup
515
440
with :
516
441
node-version : ${{ env.NODE_VERSION }}
517
-
518
- - name : Install pnpm
519
- uses : pnpm/action-setup@v4
520
- with :
521
- version : ${{ env.PNPM_VERSION }}
522
- run_install : false
442
+ pnpm-version : ${{ env.PNPM_VERSION }}
443
+ pnpm-run-install : false
444
+ pnpm-restore-cache : false # Full build is restored below
445
+ pnpm-install-cache-key : pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
523
446
524
447
- name : Restore build
525
448
uses : actions/cache@v4
526
- timeout-minutes : 10
527
449
with :
528
450
path : ./*
529
451
key : ${{ github.sha }}-${{ github.run_number }}
0 commit comments