ci: also cache pnpm metadata to skip lockfile verification
This commit is contained in:
1 file changed
+22
-14
+22
-14
@@ -24,17 +24,21 @@ jobs:
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
- name: Get pnpm store directory
|
||||
id: pnpm-store
|
||||
- name: Get pnpm cache paths
|
||||
id: pnpm-cache
|
||||
shell: bash
|
||||
run: echo "dir=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
|
||||
- name: Cache pnpm store
|
||||
run: |
|
||||
echo "store=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
|
||||
echo "cache=$(pnpm cache path --silent)" >> "$GITHUB_OUTPUT"
|
||||
- name: Cache pnpm store and metadata
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.pnpm-store.outputs.dir }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
path: |
|
||||
${{ steps.pnpm-cache.outputs.store }}
|
||||
${{ steps.pnpm-cache.outputs.cache }}
|
||||
key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
${{ runner.os }}-pnpm-
|
||||
- name: Install Dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
- name: Lint
|
||||
@@ -50,17 +54,21 @@ jobs:
|
||||
steps:
|
||||
- uses: builtin:checkout
|
||||
- uses: pnpm/action-setup@v4
|
||||
- name: Get pnpm store directory
|
||||
id: pnpm-store
|
||||
- name: Get pnpm cache paths
|
||||
id: pnpm-cache
|
||||
shell: bash
|
||||
run: echo "dir=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
|
||||
- name: Cache pnpm store
|
||||
run: |
|
||||
echo "store=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
|
||||
echo "cache=$(pnpm cache path --silent)" >> "$GITHUB_OUTPUT"
|
||||
- name: Cache pnpm store and metadata
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.pnpm-store.outputs.dir }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
path: |
|
||||
${{ steps.pnpm-cache.outputs.store }}
|
||||
${{ steps.pnpm-cache.outputs.cache }}
|
||||
key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
${{ runner.os }}-pnpm-
|
||||
- name: Install Dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
- name: Run Tests
|
||||
|
||||
Reference in new issue
Block a user