From ddfd3a73e893bd0f4cd8e050bb582bc3f29263c4 Mon Sep 17 00:00:00 2001 From: sanjibdevnathlabs Date: Fri, 13 Mar 2026 15:05:44 +0530 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=20perf(ci):=20single=20setup=20job=20?= =?UTF-8?q?with=20cache=20+=20artifact=20sharing,=20concurrency=20groups,?= =?UTF-8?q?=20fix=20badges?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ea4fc69..dd62996 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,13 +63,11 @@ jobs: - name: Build run: npm run build - - name: Upload workspace + - name: Upload build output uses: actions/upload-artifact@v4 with: - name: workspace - path: | - node_modules/ - dist/ + name: dist + path: dist/ retention-days: 1 test: @@ -84,10 +82,11 @@ jobs: with: node-version: '20.x' - - name: Download workspace - uses: actions/download-artifact@v4 + - name: Restore node_modules from cache + uses: actions/cache/restore@v4 with: - name: workspace + path: node_modules + key: node-modules-${{ runner.os }}-node20-${{ hashFiles('package-lock.json') }} - name: Run tests run: npm test @@ -104,10 +103,11 @@ jobs: with: node-version: '20.x' - - name: Download workspace - uses: actions/download-artifact@v4 + - name: Restore node_modules from cache + uses: actions/cache/restore@v4 with: - name: workspace + path: node_modules + key: node-modules-${{ runner.os }}-node20-${{ hashFiles('package-lock.json') }} - name: Type check run: npm run type-check @@ -124,10 +124,17 @@ jobs: with: node-version: '20.x' - - name: Download workspace + - name: Restore node_modules from cache + uses: actions/cache/restore@v4 + with: + path: node_modules + key: node-modules-${{ runner.os }}-node20-${{ hashFiles('package-lock.json') }} + + - name: Download build output uses: actions/download-artifact@v4 with: - name: workspace + name: dist + path: dist/ - name: Check build artifacts run: |