Skip to content

Commit a4c8f9b

Browse files
authored
Add cache option of actions/setup-node@v3 (#157)
* chore: use cache option of actions/setup-node@v3 * fix(.github/workflows): reorder to setup pnpm first
1 parent 37baab4 commit a4c8f9b

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

.github/workflows/jest.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ jobs:
55
runs-on: ubuntu-latest
66
steps:
77
- uses: actions/checkout@v3
8-
- uses: actions/setup-node@v3
9-
with:
10-
node-version-file: ".nvmrc"
118
- uses: pnpm/action-setup@v2
129
with:
1310
version: 8.6.10
11+
- uses: actions/setup-node@v3
12+
with:
13+
cache: "pnpm"
14+
cache-dependency-path: "pnpm-lock.yaml"
15+
node-version-file: ".nvmrc"
1416
- name: Install dependencies
1517
run: pnpm install
1618
- name: Build NPM packages

.github/workflows/prettier.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ jobs:
55
runs-on: ubuntu-latest
66
steps:
77
- uses: actions/checkout@v3
8-
- uses: actions/setup-node@v3
9-
with:
10-
node-version-file: ".nvmrc"
118
- uses: pnpm/action-setup@v2
129
with:
1310
version: 8.6.10
11+
- uses: actions/setup-node@v3
12+
with:
13+
cache: "pnpm"
14+
cache-dependency-path: "pnpm-lock.yaml"
15+
node-version-file: ".nvmrc"
1416
- name: Install dependencies
1517
run: pnpm install
1618
- name: Build NPM packages

.github/workflows/typescript.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ jobs:
55
runs-on: ubuntu-latest
66
steps:
77
- uses: actions/checkout@v3
8-
- uses: actions/setup-node@v3
9-
with:
10-
node-version-file: ".nvmrc"
118
- uses: pnpm/action-setup@v2
129
with:
1310
version: 8.6.10
11+
- uses: actions/setup-node@v3
12+
with:
13+
cache: "pnpm"
14+
cache-dependency-path: "pnpm-lock.yaml"
15+
node-version-file: ".nvmrc"
1416
- name: Install dependencies
1517
run: pnpm install
1618
- name: Build NPM packages

0 commit comments

Comments
 (0)