Files
ComfyUI_frontend/.github/workflows/vitest.yaml
snomiao 2e6bf4896e [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>
2025-08-14 13:45:29 +00:00

37 lines
740 B
YAML

name: Vitest Tests
on:
push:
branches: [ main, master, dev*, core/*, desktop/* ]
pull_request:
branches-ignore: [ wip/*, draft/*, temp/* ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Cache Vite
uses: actions/cache@v4
with:
path: node_modules/.vite
key: ${{ runner.os }}-vite-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-vite-
- name: Run Vitest tests
run: |
npm run test:component
npm run test:unit