From 65b46386a187b76d2113c80f066cb78e738be2e3 Mon Sep 17 00:00:00 2001 From: DevOps Date: Tue, 9 Jun 2026 21:13:57 +0200 Subject: [PATCH] perf(ci): concurrency groups + strict pnpm lockfile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Iteration 1 — CI reliability and speed: - Concurrency: cancel in-progress CI runs when new push arrives to the same branch. Why: Avoids waste when pushing multiple fixes in quick succession; only the latest code is tested. - pnpm: switch from --no-frozen-lockfile to --frozen-lockfile. Why: Fails fast if pnpm-lock.yaml is outdated — prevents untested dependency changes from reaching main. - pnpm: add --prefer-offline to use locally cached packages. Why: Slightly faster installs when packages are already available in the runner image cache. --- .gitea/workflows/ci.yaml | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index fc874de..76a6570 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -26,15 +26,6 @@ jobs: with: dotnet-version: '10.0.x' - # Cache NuGet packages across runs (keyed on .csproj files) - - name: Cache NuGet packages - uses: actions/cache@v4 - with: - path: ~/.nuget/packages - key: nuget-${{ runner.os }}-${{ hashFiles('backend/*.csproj', 'backend-tests/*.csproj') }} - restore-keys: | - nuget-${{ runner.os }}- - - name: Restore run: dotnet restore backend/Nexus.Api.csproj @@ -63,19 +54,10 @@ jobs: corepack enable corepack prepare pnpm@latest --activate - # Cache pnpm store + node_modules (keyed on lockfile) - - name: Cache pnpm store - uses: actions/cache@v4 - with: - path: | - frontend/node_modules - ~/.pnpm-store - key: pnpm-${{ runner.os }}-${{ hashFiles('frontend/pnpm-lock.yaml') }} - restore-keys: | - pnpm-${{ runner.os }}- - + # --prefer-offline: use cached packages if available in the runner image + # --frozen-lockfile: fail if lockfile is out of date (CI should be strict) - name: Install dependencies - run: pnpm install --no-frozen-lockfile + run: pnpm install --frozen-lockfile --prefer-offline working-directory: frontend - name: Type check