feat(coverage-matrix): add SDK coverage matrix dashboard#556
feat(coverage-matrix): add SDK coverage matrix dashboard#556
Conversation
|
|
View your CI Pipeline Execution ↗ for commit 60493b7
☁️ Nx Cloud last updated this comment at |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
@forgerock/davinci-client
@forgerock/device-client
@forgerock/journey-client
@forgerock/oidc-client
@forgerock/protect
@forgerock/sdk-types
@forgerock/sdk-utilities
@forgerock/iframe-manager
@forgerock/sdk-logger
@forgerock/sdk-oidc
@forgerock/sdk-request-middleware
@forgerock/storage
commit: |
|
Deployed 59a382f to https://ForgeRock.github.io/ping-javascript-sdk/pr-556/59a382f1b514708ebf74f6a8181937de355ab394 branch gh-pages in ForgeRock/ping-javascript-sdk |
📦 Bundle Size Analysis📦 Bundle Size Analysis🆕 New Packages🆕 @forgerock/journey-client - 87.8 KB (new) ➖ No Changes➖ @forgerock/sdk-logger - 1.6 KB 13 packages analyzed • Baseline from latest Legend🆕 New package ℹ️ How bundle sizes are calculated
🔄 Updated automatically on each push to this PR |
Coverage Matrix
|
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project status has failed because the head coverage (14.77%) is below the target coverage (40.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #556 +/- ##
===========================================
- Coverage 70.90% 14.77% -56.14%
===========================================
Files 53 153 +100
Lines 2021 26262 +24241
Branches 377 1056 +679
===========================================
+ Hits 1433 3879 +2446
- Misses 588 22383 +21795 🚀 New features to boost your workflow:
|
Add a coverage matrix tool that automatically discovers all @forgerock/* package exports and measures test coverage across unit tests, type tests, and e2e tests — with zero manual path maintenance. Pipeline (all via Nx): pnpm nx run @forgerock/coverage-matrix:coverage-report - Discovers packages from workspace package.json exports fields - Extracts public exports via TypeScript AST - Collects V8 unit coverage from Vitest - Collects V8 e2e coverage from Playwright's built-in CDP API - Merges into a per-export coverage matrix - Builds a Svelte dashboard deployable to GitHub Pages E2E coverage uses Playwright's page.coverage.startJSCoverage() — no instrumented builds, no Vite plugins, no Nx cache concerns. The @forgerock/e2e-shared package provides a coverage fixture that all 26 e2e test files import for automatic collection. CI integration: - Non-blocking coverage-report step in PR workflow - Coverage summary posted as PR comment - Dashboard deployed to GitHub Pages on merge to main
b812cbd to
0e53a0d
Compare
The lockfile was regenerated in a way that dropped catalog definitions for default, effect, and vitest catalogs — causing CI failures for all packages referencing catalog: specifiers under --frozen-lockfile.
Nx discovers package.json files under tools/coverage-matrix test fixtures and fails because they aren't valid workspace projects. Adding .nxignore to exclude the fixtures directory.
The deploy step was in ci.yml (PR-only) with a condition that could never be true. Move it to publish.yml which runs on push to main. Add note to PR comment that E2E coverage data is not available in PR CI since e2e tests run on DTE agents without V8 instrumentation.
Coverage fixture now writes to {cwd}/.e2e-coverage/ (the suite's
project dir) instead of the workspace root. This allows Nx Cloud DTE
agents to transfer coverage data back as declared task outputs.
Updated e2e-ci target outputs to include .e2e-coverage, and changed
the collector to scan all e2e/*/.e2e-coverage/ directories.
E2E coverage data is now transferred back from DTE agents via declared outputs, so the disclaimer is no longer accurate.
…R comment E2e coverage paths from DTE agents are absolute and differ from the main runner. Normalize both sides to workspace-relative paths (packages/...) before comparison. Use find-comment + create-or-update-comment pattern to update a single PR comment instead of creating duplicates on each push.
There was a problem hiding this comment.
Important
At least one additional CI pipeline execution has run since the conclusion below was written and it may no longer be applicable.
Nx Cloud has identified a possible root cause for your failed CI:
We classified this as an environment failure rather than a code change because the error (Timed out waiting 60000ms from config.webServer) occurs before any test files are loaded, meaning the PR's import changes cannot be the cause. Our analysis found no lines in the diff that could logically prevent the local web server from starting within the timeout window.
No code changes were suggested for this issue.
Trigger a rerun:
🎓 Learn more about Self-Healing CI on nx.dev
The deploy was only in publish.yml (main branch), so the dashboard was never populated. Add it to ci.yml as well so it deploys on every PR push to keep the dashboard current.
PR deploys to pr-{number}/{sha}/coverage-matrix/ alongside docs
preview. Main deploys to /coverage-matrix/ from publish.yml.
Changed Vite base to ./ so the same build works at any URL depth.
JIRA Ticket
N/A innovation
Description
Add a coverage matrix tool that automatically discovers all @forgerock/* package exports and measures test coverage across unit tests, type tests, and e2e tests — with zero manual path maintenance.
Pipeline (all via Nx):
pnpm nx run @forgerock/coverage-matrix:coverage-report
E2E coverage uses Playwright's page.coverage.startJSCoverage() — no instrumented builds, no Vite plugins, no Nx cache concerns. The @forgerock/e2e-shared package provides a coverage fixture that all 26 e2e test files import for automatic collection.
CI integration: