Skip to content

ci: add code coverage reporting and badge #61

@SebTardif

Description

@SebTardif

What

Set up code coverage collection and add a coverage badge to the README.

Why

193 unit tests exist but no coverage metric is tracked. A coverage badge is a trust signal for quality and helps identify untested code paths.

Approach

  1. Collect coverage using c8 (or node --test --experimental-test-coverage):

    npx c8 --reporter=text --reporter=json-summary node --test ./out-test/test/unit/*.test.js
  2. Report in CI with one of:

  3. Add badge to README:

    [![codecov](https://codecov.io/gh/patchloom/patchloom-vscode/branch/main/graph/badge.svg)](https://codecov.io/gh/patchloom/patchloom-vscode)

Per badge hygiene rule #3, only add the badge after coverage is at a reasonable level.

Identified by repo-badges skill audit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions