Skip to content

Commit

Permalink
Add cache option of actions/setup-node@v3 (#157)
Browse files Browse the repository at this point in the history
* chore: use cache option of actions/setup-node@v3
* fix(.github/workflows): reorder to setup pnpm first
  • Loading branch information
manudeli authored Jul 25, 2023
1 parent 37baab4 commit a4c8f9b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/jest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
- uses: pnpm/action-setup@v2
with:
version: 8.6.10
- uses: actions/setup-node@v3
with:
cache: "pnpm"
cache-dependency-path: "pnpm-lock.yaml"
node-version-file: ".nvmrc"
- name: Install dependencies
run: pnpm install
- name: Build NPM packages
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
- uses: pnpm/action-setup@v2
with:
version: 8.6.10
- uses: actions/setup-node@v3
with:
cache: "pnpm"
cache-dependency-path: "pnpm-lock.yaml"
node-version-file: ".nvmrc"
- name: Install dependencies
run: pnpm install
- name: Build NPM packages
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/typescript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
- uses: pnpm/action-setup@v2
with:
version: 8.6.10
- uses: actions/setup-node@v3
with:
cache: "pnpm"
cache-dependency-path: "pnpm-lock.yaml"
node-version-file: ".nvmrc"
- name: Install dependencies
run: pnpm install
- name: Build NPM packages
Expand Down

0 comments on commit a4c8f9b

Please sign in to comment.