mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-13 04:26:16 -08:00
add scoped coverage reporting
This commit is contained in:
1 parent
ade043d427
commit
fb576d7a78
31 files changed
+1407
-45
No files matched your search
@@ -23,6 +23,34 @@ pnpm nx show projects --withTarget e2e
|
||||
| Shared SQLite schema/connection | `pnpm nx test database` |
|
||||
| Packaging metadata | `pnpm nx test packaging` |
|
||||
|
||||
## Coverage Tiers
|
||||
|
||||
Use `tools/coverage/coverage-policy.json` as the source of truth for coverage
|
||||
ownership.
|
||||
|
||||
| Tier | Rule | Validation |
|
||||
| --- | --- | --- |
|
||||
| A | Product/runtime Angular, Electron, backend, data-access, portal, playlist, workspace, playback, EPG, and shared UI code collects source coverage. | `pnpm run coverage:ci` |
|
||||
| B | Validate behavior without percentage coverage, such as `website`, `packaging`, and Playwright E2E projects. | `pnpm nx test website`, `pnpm nx test packaging`, or the closest E2E target |
|
||||
| C | Excluded from the source coverage baseline, such as mock servers, test helper libraries, and untested feature shells. | Validate through dependent flows, or add focused tests when changing behavior directly |
|
||||
|
||||
`apps/website` is an Astro marketing site. Its useful signal is a successful
|
||||
static build plus targeted output checks, not a merged code coverage percentage.
|
||||
Projects with a test target but no specs, such as `remote-control-web` and
|
||||
`remote-control` today, should not be in Tier A until focused specs exist.
|
||||
|
||||
For local coverage inspection:
|
||||
|
||||
```bash
|
||||
pnpm run coverage:unit:ci
|
||||
pnpm run coverage:merge
|
||||
pnpm run coverage:health
|
||||
```
|
||||
|
||||
The merged report is written to `coverage/merged/` as HTML, LCOV, Cobertura,
|
||||
and JSON summary output. CI uploads the merged Tier A report to Codecov with the
|
||||
`unit` flag and keeps the HTML report as a GitHub artifact.
|
||||
|
||||
## E2E
|
||||
|
||||
| Area | Command |
|
||||
@@ -33,6 +61,23 @@ pnpm nx show projects --withTarget e2e
|
||||
Use atomized E2E targets when available, for example
|
||||
`pnpm nx run web-e2e:e2e-ci--src/xtream.e2e.ts`.
|
||||
|
||||
Playwright coverage is measured semantically by tags and critical journeys, not
|
||||
by a source-line percentage. E2E reports should use tags such as `@critical`,
|
||||
`@electron`, `@web`, `@xtream`, `@stalker`, `@m3u`, `@search`, `@epg`,
|
||||
`@persistence`, `@settings`, `@pwa`, and `@self-hosted`.
|
||||
|
||||
After an E2E run, generate the semantic summary with:
|
||||
|
||||
```bash
|
||||
pnpm run coverage:e2e:summary
|
||||
```
|
||||
|
||||
For local investigation only, Chromium browser V8 coverage can be explored with:
|
||||
|
||||
```bash
|
||||
pnpm run coverage:e2e:v8:web
|
||||
```
|
||||
|
||||
## I18n
|
||||
|
||||
```bash
|
||||
|
||||
Reference in new issue
Block a user