mirror of
https://github.com/ivuorinen/tree-sitter-shellspec.git
synced 2026-02-04 15:47:34 +00:00
feat(ci): expand cache paths to support all Node.js package managers
- Add comprehensive caching for npm, yarn, and pnpm package managers - Cache paths now include: - npm: ~/.npm, node_modules/.cache - yarn: ~/.yarn, ~/.cache/yarn, ~/.cache/yarn/global - pnpm: ~/.pnpm-store, ~/.cache/pnpm, ~/.local/share/pnpm/global - Update cache keys to include all lockfile types (package-lock.json, yarn.lock, pnpm-lock.yaml) - Rename 'Cache Tree-sitter CLI' to 'Cache npx store' for clarity - Apply changes consistently across test, lint, and coverage jobs This improves cache hit rates and build performance regardless of which Node.js package manager is used in the development environment.
This commit is contained in:
30
.github/workflows/release.yml
vendored
30
.github/workflows/release.yml
vendored
@@ -17,6 +17,10 @@ concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: false
|
||||
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
validate:
|
||||
name: 🔍 Validate Release
|
||||
@@ -116,8 +120,14 @@ jobs:
|
||||
- name: Cache Node.js dependencies
|
||||
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-24-${{ hashFiles('**/package-lock.json') }}
|
||||
path: |
|
||||
~/.npm
|
||||
~/.yarn
|
||||
~/.cache/yarn
|
||||
~/.pnpm-store
|
||||
~/.cache/pnpm
|
||||
node_modules/.cache
|
||||
key: ${{ runner.os }}-node-24-${{ hashFiles('**/package-lock.json', '**/yarn.lock', '**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-24-
|
||||
${{ runner.os }}-node-
|
||||
@@ -155,8 +165,14 @@ jobs:
|
||||
- name: Cache Node.js dependencies
|
||||
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-24-${{ hashFiles('**/package-lock.json') }}
|
||||
path: |
|
||||
~/.npm
|
||||
~/.yarn
|
||||
~/.cache/yarn
|
||||
~/.pnpm-store
|
||||
~/.cache/pnpm
|
||||
node_modules/.cache
|
||||
key: ${{ runner.os }}-node-24-${{ hashFiles('**/package-lock.json', '**/yarn.lock', '**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-24-
|
||||
${{ runner.os }}-node-
|
||||
@@ -164,12 +180,6 @@ jobs:
|
||||
- name: Install Dependencies
|
||||
run: npm ci || { echo "❌ npm install failed"; npm install; }
|
||||
|
||||
- name: Cache Tree-sitter CLI
|
||||
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
||||
with:
|
||||
path: ~/.npm/_npx
|
||||
key: ${{ runner.os }}-tree-sitter-cli-${{ hashFiles('package.json') }}
|
||||
|
||||
- name: Cache Generated Grammar
|
||||
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
||||
id: cache-grammar
|
||||
|
||||
Reference in New Issue
Block a user