Files
ComfyUI_frontend/.github/workflows/ci-tests-unit.yaml
snomiao 89224e3e86 fix: resolve merge conflict in knip.config.ts
Merged both sets of ignore entries from sno-deploy-ghpage and main branches.
2025-10-20 18:42:19 +00:00

54 lines
1.5 KiB
YAML

name: "CI: Tests Unit"
description: "Unit and component testing with Vitest"
on:
push:
branches: [main, master, dev*, core/*, desktop/*, sno-deploy-ghpage]
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: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run Vitest tests
run: pnpm test:unit
- name: Generate test reports (on main or debug branch)
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/sno-deploy-ghpage'
run: |
mkdir -p ./vitest-reports
pnpm exec vitest \
--reporter=json --outputFile.json="./vitest-reports/results.json" \
--reporter=html --outputFile.html="./vitest-reports/index.html" \
--run
- name: Upload Vitest reports artifact (on main or debug branch)
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/sno-deploy-ghpage'
uses: actions/upload-artifact@v4
with:
name: vitest-reports
path: vitest-reports/
retention-days: 7