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:
14
.github/workflows/build-and-test.yml
vendored
14
.github/workflows/build-and-test.yml
vendored
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user