Skip to content

Enforce test coverage thresholds in CI #5

Closed

Description

@morluto

Motivation

Coverage instrumentation is available in vitest.config.ts but currently disabled (enabled: false). Enforcing minimum coverage thresholds in CI ensures that new code contributions maintain test quality and gives agents clear feedback when their changes reduce coverage.

Proposed Changes

  1. Enable coverage in vitest.config.ts with provider set to v8
  2. Add coverageThreshold config with initial thresholds (e.g., 60% lines, 60% branches, 60% functions, 60% statements)
  3. Update CI workflow to run tests with coverage and fail on threshold violations
  4. Document coverage expectations in CONTRIBUTING.md

Acceptance Criteria

  • npm test fails when coverage drops below configured thresholds
  • CI workflow enforces coverage on every PR
  • Thresholds are set to realistic values based on current coverage levels

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2: mediumarea: buildarea: testsenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions