From a7b14c5c402652505c49f73984329ea0715c842a Mon Sep 17 00:00:00 2001 From: Fractal-Tess Date: Sun, 12 May 2024 22:42:27 +0300 Subject: [PATCH] add pnpm stores --- .github/workflows/clippy.yml | 16 ++++++++++++++++ .github/workflows/publish.yml | 20 ++++++++++++++++++-- .github/workflows/test.yml | 17 +++++++++++++++++ 3 files changed, 51 insertions(+), 2 deletions(-) diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index 8adf074..bb31556 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -17,6 +17,22 @@ jobs: with: version: 9 + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - uses: actions/cache@v4 + name: Setup pnpm cache + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install + - name: Setup Node.js uses: actions/setup-node@v3 with: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6b7b6a5..1bc9024 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -23,12 +23,28 @@ jobs: fetch-depth: 0 - name: Pnpm setup - uses: pnpm/action-setup@v2 + uses: pnpm/action-setup@v4 with: version: 9 + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - uses: actions/cache@v4 + name: Setup pnpm cache + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install + - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 20 cache: pnpm diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6c6aba8..1f40943 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,6 +22,23 @@ jobs: with: version: 9 + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - uses: actions/cache@v4 + name: Setup pnpm cache + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install + + - name: Setup Node.js uses: actions/setup-node@v3 with: