From 210d64645e99e455db263d9cdaabda44c9a74dd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Thu, 5 Nov 2026 17:12:40 +0400 Subject: [PATCH 1/2] ci: use builtin:checkout and cache pnpm store --- .gitea/workflows/ci.yaml | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 2871fe8..00863bd 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -18,12 +18,23 @@ jobs: timeout-minutes: 10 steps: - - uses: actions/checkout@v4 + - uses: builtin:checkout - uses: pnpm/action-setup@v4 - name: Install Node uses: actions/setup-node@v4 with: node-version: 22 + - name: Get pnpm store directory + id: pnpm-store + shell: bash + run: echo "dir=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT" + - name: Cache pnpm store + uses: actions/cache@v4 + with: + path: ${{ steps.pnpm-store.outputs.dir }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- - name: Install Dependencies run: pnpm install --frozen-lockfile - name: Lint @@ -37,8 +48,19 @@ jobs: timeout-minutes: 10 steps: - - uses: actions/checkout@v4 + - uses: builtin:checkout - uses: pnpm/action-setup@v4 + - name: Get pnpm store directory + id: pnpm-store + shell: bash + run: echo "dir=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT" + - name: Cache pnpm store + uses: actions/cache@v4 + with: + path: ${{ steps.pnpm-store.outputs.dir }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- - name: Install Dependencies run: pnpm install --frozen-lockfile - name: Run Tests -- 2.50.1 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 2/2] 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 -- 2.50.1