Files
ComfyUI_frontend/.github/workflows/ci-tests-unit.yaml
snomiao d372cd1d02 [feat] align CI workflow names with filename standard
Update all CI workflow names to follow "CI: <Description>" pattern
for 1:1 correspondence with filenames as suggested by @benceruleanlu:

- ci-json-validation.yaml → "CI: JSON Validation"
- ci-lint-format.yaml → "CI: Lint Format"
- ci-python-validation.yaml → "CI: Python Validation"
- ci-tests-e2e.yaml → "CI: Tests E2E"
- ci-tests-unit.yaml → "CI: Tests Unit"
- ci-tests-storybook.yaml → "CI: Tests Storybook"
- ci-tests-*-forks.yaml → "CI: Tests * Forks"

Also added explanation of JSON validation scope (all .json files
except tsconfig*.json) to address reviewer question.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-13 23:58:06 +00:00

52 lines
1.3 KiB
YAML

name: "CI: Tests Unit"
# Unit and component testing with Vitest
# Runs on main branches and PRs, skips WIP branches
on:
push:
branches: [main, master, dev*, core/*, desktop/*]
pull_request:
branches-ignore: [wip/*, draft/*, temp/*]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "lts/*"
cache: "pnpm"
- name: Cache tool outputs
uses: actions/cache@v4
with:
path: |
.cache
coverage
.vitest-cache
key: vitest-cache-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('src/**/*.{ts,vue,js}', 'vitest.config.*', 'tsconfig.json') }}
restore-keys: |
vitest-cache-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}-
vitest-cache-${{ runner.os }}-
test-tools-cache-${{ runner.os }}-
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run Vitest tests
run: pnpm test:unit