From eaa0f20d43d1652a4a9e1d6f0af209a602dfe07b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Thu, 5 Nov 2026 17:20:52 +0400 Subject: [PATCH] ci: also cache pnpm metadata to skip lockfile verification --- .gitea/workflows/ci.yaml | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 00863bd..d838764 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -24,17 +24,21 @@ jobs: uses: actions/setup-node@v4 with: node-version: 22 - - name: Get pnpm store directory - id: pnpm-store + - name: Get pnpm cache paths + id: pnpm-cache shell: bash - run: echo "dir=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT" - - name: Cache pnpm store + run: | + echo "store=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT" + echo "cache=$(pnpm cache path --silent)" >> "$GITHUB_OUTPUT" + - name: Cache pnpm store and metadata uses: actions/cache@v4 with: - path: ${{ steps.pnpm-store.outputs.dir }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }} + path: | + ${{ steps.pnpm-cache.outputs.store }} + ${{ steps.pnpm-cache.outputs.cache }} + key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }} restore-keys: | - ${{ runner.os }}-pnpm-store- + ${{ runner.os }}-pnpm- - name: Install Dependencies run: pnpm install --frozen-lockfile - name: Lint @@ -50,17 +54,21 @@ jobs: steps: - uses: builtin:checkout - uses: pnpm/action-setup@v4 - - name: Get pnpm store directory - id: pnpm-store + - name: Get pnpm cache paths + id: pnpm-cache shell: bash - run: echo "dir=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT" - - name: Cache pnpm store + run: | + echo "store=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT" + echo "cache=$(pnpm cache path --silent)" >> "$GITHUB_OUTPUT" + - name: Cache pnpm store and metadata uses: actions/cache@v4 with: - path: ${{ steps.pnpm-store.outputs.dir }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }} + path: | + ${{ steps.pnpm-cache.outputs.store }} + ${{ steps.pnpm-cache.outputs.cache }} + key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }} restore-keys: | - ${{ runner.os }}-pnpm-store- + ${{ runner.os }}-pnpm- - name: Install Dependencies run: pnpm install --frozen-lockfile - name: Run Tests