From 96a35b03884bc69d7fab2a256b490158a3ac4498 Mon Sep 17 00:00:00 2001 From: Bradley Shellnut Date: Wed, 27 Sep 2023 22:18:43 +1300 Subject: [PATCH] PNPM in action. --- .github/workflows/node.js.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 0299a7b..75f202c 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -25,6 +25,24 @@ jobs: with: node-version: ${{ matrix.node-version }} cache: 'npm' + - uses: pnpm/action-setup@v2 + name: Install pnpm + with: + version: 8 + run_install: false + - 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 - run: npm ci - run: npm run build --if-present - run: npm test