From a828582d3b2a427e7839f8f6bcded9fcb1bda334 Mon Sep 17 00:00:00 2001 From: rohit Date: Sat, 16 Mar 2024 01:59:09 +0530 Subject: [PATCH] setup pnpm --- .github/workflows/lighthouse.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/lighthouse.yml b/.github/workflows/lighthouse.yml index df6fe05..7b127c1 100644 --- a/.github/workflows/lighthouse.yml +++ b/.github/workflows/lighthouse.yml @@ -13,6 +13,30 @@ jobs: with: ref: ${{ github.event.pull_request.head.sha }} + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: 18 + + - uses: pnpm/action-setup@v3 + name: Install pnpm + with: + run_install: false + version: 8 + + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - uses: actions/cache@v3 + 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