feat(workflows): add pnpm cache to build-and-test action

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
braks
2022-12-30 01:00:33 +01:00
committed by Braks
parent 1160d3d2fb
commit 1e0037c5a1

View File

@@ -41,6 +41,20 @@ jobs:
- name: Setup pnpm config 🏗
run: pnpm config set store-dir $PNPM_CACHE_FOLDER
- name: Get pnpm store directory 🏬
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache 🧃
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies 👨🏻‍💻
run: pnpm install