[feat] Add comprehensive caching to CI/CD workflows

- Add ESLint cache (.eslintcache) to auto-fix and fork PR workflows
- Add npm cache to all Node.js setup steps across workflows
- Add Vite build cache (node_modules/.vite) to improve build performance
- Add Playwright browser cache with version-specific keys
- Optimize test-ui, vitest, release, and auto-fix workflows

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
snomiao
2025-08-14 13:45:29 +00:00
parent b87a251e6b
commit 2e6bf4896e
4 changed files with 67 additions and 6 deletions

View File

@@ -22,6 +22,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'npm'
- name: Get current version
id: current_version
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
@@ -34,6 +35,13 @@ jobs:
else
echo "is_prerelease=false" >> $GITHUB_OUTPUT
fi
- name: Cache Vite build
uses: actions/cache@v4
with:
path: node_modules/.vite
key: ${{ runner.os }}-vite-release-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-vite-release-
- name: Build project
env:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
@@ -117,6 +125,7 @@ jobs:
with:
node-version: 'lts/*'
registry-url: https://registry.npmjs.org
cache: 'npm'
- run: npm ci
- run: npm run build:types
- name: Publish package