Skip to content

Commit d65d1fa

Browse files
committed
ci: add yarn cache (#791)
1 parent bf5e675 commit d65d1fa

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

.github/workflows/test.yml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,36 @@ jobs:
1111

1212
steps:
1313
- uses: actions/checkout@v4
14-
- uses: actions/setup-node@v4
14+
15+
# Setup Node.js
16+
- name: Set up Node.js
17+
uses: actions/setup-node@v4
1518
with:
1619
node-version: '22.14'
17-
- run: corepack enable
20+
# Note: We're not using the built-in cache here because we need to use corepack
21+
22+
- name: Setup Corepack
23+
run: corepack enable
24+
25+
- id: yarn-cache-dir-path
26+
name: Get yarn cache directory path
27+
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
28+
29+
- name: Cache Yarn dependencies
30+
uses: actions/cache@v3
31+
id: yarn-cache
32+
with:
33+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
34+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
35+
restore-keys: |
36+
${{ runner.os }}-yarn-
37+
1838
- name: Install dependencies
19-
run: yarn install --frozen-lockfile
39+
run: yarn install
40+
2041
- name: Run actor-core tests
2142
run: yarn test
43+
2244
# - name: Install Rust
2345
# uses: dtolnay/rust-toolchain@stable
2446
# - name: Run Rust client tests

0 commit comments

Comments
 (0)