mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 06:20:11 +00:00
- Convert coverage-report.js and unified-report.js to TypeScript - Add 37 unit tests for coverage-slack-notify.ts pure functions - Export pure functions from coverage-slack-notify.ts for testability - Eliminate duplicate unit test run: Slack workflow now downloads coverage artifacts from CI: Tests Unit via workflow_run trigger instead of re-running pnpm test:coverage - Upload unit-coverage artifact from ci-tests-unit.yaml on push - Remove E2E coverage from PR report (only runs on push to main, cannot populate PR comments) — keep as main-only baseline - Remove dead coverage-status arg from unified-report.ts - Fix pr-meta in Slack workflow to read commit from workflow_run context instead of push payload
46 lines
1.2 KiB
YAML
46 lines
1.2 KiB
YAML
# Description: Unit and component testing with Vitest + coverage reporting
|
|
name: 'CI: Tests Unit'
|
|
|
|
on:
|
|
push:
|
|
branches: [main, master, dev*, core/*, desktop/*]
|
|
paths-ignore: ['**/*.md']
|
|
pull_request:
|
|
branches-ignore: [wip/*, draft/*, temp/*]
|
|
paths-ignore: ['**/*.md']
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Setup frontend
|
|
uses: ./.github/actions/setup-frontend
|
|
|
|
- name: Run Vitest tests with coverage
|
|
run: pnpm test:coverage
|
|
|
|
- name: Upload unit coverage artifact
|
|
if: always() && github.event_name == 'push'
|
|
uses: actions/upload-artifact@v6
|
|
with:
|
|
name: unit-coverage
|
|
path: coverage/lcov.info
|
|
retention-days: 30
|
|
if-no-files-found: warn
|
|
|
|
- name: Upload coverage to Codecov
|
|
if: always()
|
|
uses: codecov/codecov-action@1af58845a975a7985b0beb0cbe6fbbb71a41dbad # v5.5.3
|
|
with:
|
|
files: coverage/lcov.info
|
|
flags: unit
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
fail_ci_if_error: false
|