Skip to content

Commit c33e498

Browse files
committed
fix: add working-directory to Node.js setup steps for pnpm caching
- Add working-directory: ${{ github.workspace }} to all Node.js setup steps that use pnpm caching - This ensures pnpm-lock.yaml is found in the correct directory - Fixes 'Dependencies lock file is not found' error in CI workflows
1 parent ddf2506 commit c33e498

24 files changed

+61
-28
lines changed

.github/workflows/binarytree-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ jobs:
5252
with:
5353
node-version: 20
5454
cache: 'pnpm'
55+
working-directory: ${{ github.workspace }}
5556

5657
- name: Install Dependencies (if not restored from cache)
5758
if: steps.dep-cache.outputs.cache-hit != 'true'

.github/workflows/block-build.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,21 @@ concurrency:
3131
jobs:
3232
test-block:
3333
runs-on: ubuntu-latest
34-
steps:
34+
steps:
3535
# We clone the repo and submodules if triggered from work-flow dispatch
3636
- if: inputs.submodule-cache-key == 'none'
3737
uses: actions/checkout@v5
3838
with:
3939
submodules: recursive
4040

4141
# We restore the code/deps from cache if triggered from workflow_call (i.e. have valid cache key)
42-
- if: inputs.dep-cache-key != 'none'
42+
- if: inputs.dep-cache-key != 'none'
4343
uses: actions/cache/restore@v4
4444
id: dep-cache
4545
with:
4646
path: ${{github.workspace}}
4747
key: ${{ inputs.dep-cache-key }}
48-
48+
4949
- uses: pnpm/action-setup@v4
5050
with:
5151
version: 10.5.2
@@ -56,6 +56,7 @@ jobs:
5656
with:
5757
node-version: 20
5858
cache: 'pnpm'
59+
working-directory: ${{ github.workspace }}
5960

6061
- name: Install Dependencies (if called from workflow_dispatch)
6162
if: steps.dep-cache.outputs.cache-hit != 'true'

.github/workflows/blockchain-build.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ jobs:
3333
- if: inputs.submodule-cache-key == 'none'
3434
uses: actions/checkout@v5
3535

36-
# We restore the code/deps from cache if triggered from workflow_call (i.e. have valid cache key)
36+
# We restore the code/deps from cache if triggered from workflow_call (i.e. have valid cache key)
3737
- uses: actions/cache/restore@v4
3838
id: dep-cache
3939
with:
4040
path: ${{github.workspace}}
4141
key: ${{ inputs.dep-cache-key }}
42-
42+
4343
- uses: pnpm/action-setup@v4
4444
with:
4545
version: 10.5.2
@@ -50,12 +50,14 @@ jobs:
5050
with:
5151
node-version: 20
5252
cache: 'pnpm'
53+
working-directory: ${{ github.workspace }}
54+
working-directory: ${{ github.workspace }}
5355

5456
- name: Install Dependencies (if called from workflow_dispatch)
5557
if: steps.dep-cache.outputs.cache-hit != 'true'
5658
run: pnpm install --frozen-lockfile
5759
working-directory: ${{ github.workspace }}
58-
60+
5961
- run: pnpm run coverage
6062
- uses: codecov/codecov-action@v4
6163
with:

.github/workflows/browser.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ jobs:
3838
submodules: recursive
3939

4040
# We restore the code/deps from cache if triggered from workflow_call (i.e. have valid cache key)
41-
- if: inputs.dep-cache-key != 'none'
41+
- if: inputs.dep-cache-key != 'none'
4242
uses: actions/cache/restore@v4
4343
id: dep-cache
4444
with:
4545
path: ${{github.workspace}}
4646
key: ${{ inputs.dep-cache-key }}
47-
47+
4848
- uses: pnpm/action-setup@v4
4949
with:
5050
version: 10.5.2
@@ -55,6 +55,7 @@ jobs:
5555
with:
5656
node-version: 20
5757
cache: 'pnpm'
58+
working-directory: ${{ github.workspace }}
5859

5960
- name: Install Dependencies (if called from workflow_dispatch)
6061
if: steps.dep-cache.outputs.cache-hit != 'true'

.github/workflows/client-build.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- if: inputs.submodule-cache-key == 'none'
3737
uses: actions/checkout@v5
3838

39-
- if: inputs.dep-cache-key != 'none'
39+
- if: inputs.dep-cache-key != 'none'
4040
uses: actions/cache/restore@v4
4141
id: dep-cache
4242
with:
@@ -53,6 +53,7 @@ jobs:
5353
with:
5454
node-version: 20
5555
cache: 'pnpm'
56+
working-directory: ${{ github.workspace }}
5657

5758
- name: Install Dependencies (if not restored from cache)
5859
if: steps.dep-cache.outputs.cache-hit != 'true'
@@ -81,7 +82,7 @@ jobs:
8182
uses: actions/checkout@v5
8283

8384
# We restore the code/deps from cache if triggered from workflow_call (i.e. have valid cache key)
84-
- if: inputs.dep-cache-key != 'none'
85+
- if: inputs.dep-cache-key != 'none'
8586
uses: actions/cache/restore@v4
8687
id: dep-cache
8788
with:
@@ -98,6 +99,7 @@ jobs:
9899
with:
99100
node-version: 20
100101
cache: 'pnpm'
102+
working-directory: ${{ github.workspace }}
101103

102104
- name: Install Dependencies (if not restored from cache)
103105
if: steps.dep-cache.outputs.cache-hit != 'true'

.github/workflows/common-build.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
uses: actions/checkout@v5
3636

3737
# We restore the code/deps from cache if triggered from workflow_call (i.e. have valid cache key)
38-
- if: inputs.dep-cache-key != 'none'
38+
- if: inputs.dep-cache-key != 'none'
3939
uses: actions/cache/restore@v4
4040
id: dep-cache
4141
with:
@@ -52,6 +52,7 @@ jobs:
5252
with:
5353
node-version: 20
5454
cache: 'pnpm'
55+
working-directory: ${{ github.workspace }}
5556

5657
- name: Install Dependencies (if not restored from cache)
5758
if: steps.dep-cache.outputs.cache-hit != 'true'
@@ -69,7 +70,7 @@ jobs:
6970
# Run coverage for util
7071
- run: pnpm run coverage
7172
working-directory: ${{ github.workspace }}/packages/util
72-
73+
7374
- uses: codecov/codecov-action@v4
7475
with:
7576
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/devp2p-build.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
uses: actions/checkout@v5
3333

3434
# We restore the code/deps from cache if triggered from workflow_call (i.e. have valid cache key)
35-
- if: inputs.dep-cache-key != 'none'
35+
- if: inputs.dep-cache-key != 'none'
3636
uses: actions/cache/restore@v4
3737
id: dep-cache
3838
with:
@@ -49,13 +49,14 @@ jobs:
4949
with:
5050
node-version: 20
5151
cache: 'pnpm'
52+
working-directory: ${{ github.workspace }}
5253

5354
- name: Install Dependencies (if not restored from cache)
5455
if: steps.dep-cache.outputs.cache-hit != 'true'
5556
run: pnpm install --frozen-lockfile
5657
working-directory: ${{ github.workspace }}
5758

58-
59+
5960
- run: pnpm run coverage
6061
working-directory: ${{ github.workspace }}/packages/devp2p
6162
- uses: codecov/codecov-action@v4

.github/workflows/docker-image.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040
with:
4141
node-version: ${{ matrix.node-version }}
4242
cache: 'pnpm'
43+
working-directory: ${{ github.workspace }}
4344

4445
- run: pnpm install --frozen-lockfile
4546
working-directory: ${{ github.workspace }}

.github/workflows/evm-build.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
submodules: recursive
4040

4141
# We restore the code/deps from cache if triggered from workflow_call (i.e. have valid cache key)
42-
- if: inputs.dep-cache-key != 'none'
42+
- if: inputs.dep-cache-key != 'none'
4343
uses: actions/cache/restore@v4
4444
id: dep-cache
4545
with:
@@ -56,12 +56,13 @@ jobs:
5656
with:
5757
node-version: 20
5858
cache: 'pnpm'
59+
working-directory: ${{ github.workspace }}
5960

6061
- name: Install Dependencies (if not restored from cache)
6162
if: steps.dep-cache.outputs.cache-hit != 'true'
6263
run: pnpm install --frozen-lockfile
6364
working-directory: ${{ github.workspace }}
64-
65+
6566
- if: inputs.submodule-cache-key != 'none'
6667
uses: actions/cache/restore@v4
6768
name: Initialize ethereum-tests

.github/workflows/examples.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ jobs:
2929
submodules: recursive
3030

3131
# We restore the code/deps from cache if triggered from workflow_call (i.e. have valid cache key)
32-
- if: inputs.dep-cache-key != 'none'
32+
- if: inputs.dep-cache-key != 'none'
3333
uses: actions/cache/restore@v4
3434
id: dep-cache
3535
with:
3636
path: ${{github.workspace}}
3737
key: ${{ inputs.dep-cache-key }}
38-
38+
3939
- uses: pnpm/action-setup@v4
4040
with:
4141
version: 10.5.2
@@ -46,6 +46,7 @@ jobs:
4646
with:
4747
node-version: 20
4848
cache: 'pnpm'
49+
working-directory: ${{ github.workspace }}
4950

5051
- name: Install Dependencies (if not restored from cache)
5152
if: steps.dep-cache.outputs.cache-hit != 'true'

0 commit comments

Comments
 (0)