ci: add QA stats workflow to collect tests metrics#26559
Conversation
Adds a new qa-stats.yml workflow triggered via workflow_run after the ci workflow completes on main. Modifies ci.yml to output Jest test results JSON per shard and aggregate them in the merge-cv-test-coverage job into a cv-test-stats artifact. The collect-qa-stats.mjs script reads the pre-aggregated stats and writes qa-stats.json for consumption by downstream workflows. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
| echo "No changes detected" | ||
| fi | ||
|
|
||
| js-bundle-size-check: |
There was a problem hiding this comment.
just location change, for consistency with jobs that run first in the workflow
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
None of these changes:
The CI pipeline itself will validate these changes by running successfully. No E2E tests are needed to verify CI infrastructure changes that don't touch the application or test execution logic. Performance Test Selection: |
Description
Introduces an automated pipeline that collects test metrics after every successful push to
mainand writes them to aqa-stats.jsonartifact.qa-stats.ymlworkflow — triggers after CI succeeds onmain(excludes PRs, forks, failed runs)collect-qa-stats.mjs— extensible script that fetches CI artifacts via GitHub API (paginated) and collectscomponent_view_tests_countandunit_tests_count(passed + failed, excludes skipped/todo). Collector failures are isolated and don't crash the runci.yml— shard jobs now extract a minimal{"count": N}viajqinstead of uploading full Jest JSON; removed redundantmerge-cv-test-coveragejob (folded intomerge-unit-and-component-view-tests), saving oneyarn installper CI run; renamedcoverageartifact tolcov.infoChangelog
CHANGELOG entry: null
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
N/A — new workflow, no prior state.
After
N/A — CI-only change; artifacts visible in GitHub Actions run summary after merging to
main.Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
CI/workflow logic is reworked to produce and aggregate per-shard artifacts and to add a new
workflow_runpipeline; failures could break coverage aggregation, artifact naming expectations, or downstream CI consumers.Overview
After successful
mainCI runs, a newQA Statsworkflow_runpipeline downloads CI artifacts and publishesqa-stats.jsoncontaining unit and component-view test counts.ci.ymlnow emits per-shard test result JSON, extracts passed+failed test counts into smallcount.jsonfiles, aggregates totals inmerge-unit-and-component-view-tests, and uploads new artifacts (cv-test-stats,unit-test-stats,lcov.info, plus CV HTML coverage); it also removes the separate CV-coverage merge job and renames coverage artifacts accordingly.Adds
.github/scripts/collect-qa-stats.mjsto fetch artifacts via the GitHub API (paginated, manual redirect handling) and tolerate missing metrics by skipping failed collectors.Written by Cursor Bugbot for commit bfdaaa6. This will update automatically on new commits. Configure here.