diff --git a/.github/workflows/if-nodejs-pr-testing.yml b/.github/workflows/if-nodejs-pr-testing.yml index d5defa421..90f43a592 100644 --- a/.github/workflows/if-nodejs-pr-testing.yml +++ b/.github/workflows/if-nodejs-pr-testing.yml @@ -43,13 +43,28 @@ jobs: - if: steps.should_run.outputs.shouldrun == 'true' name: Checkout repository uses: actions/checkout@v4 - - if: steps.should_run.outputs.shouldrun == 'true' - uses: pnpm/action-setup@v3 - if: steps.should_run.outputs.shouldrun == 'true' name: Setup Node.js uses: actions/setup-node@v4 with: - cache: 'pnpm' + node-version: 20 + - if: steps.should_run.outputs.shouldrun == 'true' + uses: pnpm/action-setup@v3 + with: + run_install: false + - if: steps.should_run.outputs.shouldrun == 'true' + name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + - if: steps.should_run.outputs.shouldrun == 'true' + uses: actions/cache@v4 + name: Setup pnpm cache + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- - if: steps.should_run.outputs.shouldrun == 'true' name: Install dependencies shell: bash