From a4c8f9b126a6fc95dd8131e6a893fec026bc2d03 Mon Sep 17 00:00:00 2001 From: Jonghyeon Ko Date: Tue, 25 Jul 2023 20:49:25 +0900 Subject: [PATCH] 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 --- .github/workflows/jest.yml | 8 +++++--- .github/workflows/prettier.yml | 8 +++++--- .github/workflows/typescript.yml | 8 +++++--- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/jest.yml b/.github/workflows/jest.yml index c0d73f8..50722b8 100644 --- a/.github/workflows/jest.yml +++ b/.github/workflows/jest.yml @@ -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 diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index 971deeb..a2ddf10 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -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 diff --git a/.github/workflows/typescript.yml b/.github/workflows/typescript.yml index 5a8b628..b0ffadb 100644 --- a/.github/workflows/typescript.yml +++ b/.github/workflows/typescript.yml @@ -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