Skip to content

Commit 9fbdab8

Browse files
chore: optimize pnpm cache configuration (elizaOS#2555)
- Move pnpm setup before cache configuration - Add architecture-specific cache keys - Include package.json in cache key for better specificity - Add explicit store-dir configuration - Improve restore-keys with more specific fallbacks This change aims to improve package reuse during installation while maintaining existing functionality. Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Sayo <hi@sayo.wtf>
1 parent e10b7f4 commit 9fbdab8

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

.github/workflows/integrationTests.yaml

+14-9
Original file line numberDiff line numberDiff line change
@@ -15,33 +15,38 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v4
1717

18+
- uses: pnpm/action-setup@v3
19+
with:
20+
version: 9.15.0
21+
1822
- name: Cache pnpm
1923
uses: actions/cache@v4
2024
with:
2125
path: |
2226
~/.pnpm-store
2327
**/node_modules
24-
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
25-
restore-keys: ${{ runner.os }}-pnpm-
28+
key: ${{ runner.os }}-pnpm-${{ runner.arch }}-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('**/package.json') }}
29+
restore-keys: |
30+
${{ runner.os }}-pnpm-${{ runner.arch }}-${{ hashFiles('**/pnpm-lock.yaml') }}-
31+
${{ runner.os }}-pnpm-${{ runner.arch }}-
2632
2733
- name: Cache plugin dist
2834
uses: actions/cache@v4
2935
with:
3036
path: |
3137
**/packages/plugin-*/dist
32-
key: ${{ runner.os }}-plugin-dist-${{ hashFiles('**/pnpm-lock.yaml') }}
33-
restore-keys: ${{ runner.os }}-plugin-dist-
34-
35-
- uses: pnpm/action-setup@v3
36-
with:
37-
version: 9.15.0
38+
key: ${{ runner.os }}-plugin-dist-${{ runner.arch }}-${{ hashFiles('**/pnpm-lock.yaml') }}
39+
restore-keys: |
40+
${{ runner.os }}-plugin-dist-${{ runner.arch }}-
3841
3942
- uses: actions/setup-node@v4
4043
with:
4144
node-version: "23.3.0"
4245

4346
- name: Install dependencies
44-
run: pnpm install -r --no-frozen-lockfile
47+
run: |
48+
pnpm config set store-dir ~/.pnpm-store
49+
pnpm install -r --no-frozen-lockfile
4550
4651
- name: Build packages
4752
run: pnpm build

0 commit comments

Comments
 (0)