Skip to content

Setup coverage reporting and CI gates (enforce 90-92% line coverage) #61

Description

@johnproblems

Task: Setup coverage reporting and CI gates (enforce 90-92% line coverage)

Description

Configure comprehensive code coverage reporting using nyc/Istanbul and set up CI/CD pipeline gates to enforce minimum coverage thresholds. Integrate coverage reporting with GitHub Actions and add badges to the project README.

Acceptance Criteria

  • nyc/Istanbul configured with 90-92% coverage thresholds
  • Coverage reports generated in multiple formats (HTML, LCOV, JSON, text)
  • CI pipeline fails if coverage drops below 90%
  • Coverage reports uploaded to Codecov or Coveralls
  • Coverage badge added to README
  • Per-file coverage metrics visible
  • Branch coverage and function coverage tracked
  • Coverage trends monitored over time

Technical Details

  • Configure .nycrc or nyc in package.json:
    {
      "all": true,
      "check-coverage": true,
      "lines": 90,
      "functions": 90,
      "branches": 90,
      "statements": 90,
      "reporter": ["html", "lcov", "text", "json"],
      "exclude": ["test/**", "out/**", "dist/**", "**/*.d.ts"]
    }
  • Update package.json scripts:
    • test:coverage - run tests with coverage
    • coverage:report - generate HTML report
    • coverage:check - validate thresholds
  • Configure GitHub Actions workflow:
    • Run tests with coverage on all PRs
    • Upload coverage reports to Codecov/Coveralls
    • Add PR comments with coverage diff
    • Fail builds below threshold
  • Add coverage badge to README:
    • Codecov badge or Coveralls badge
    • Link to coverage dashboard
  • Configure IDE coverage highlighting
  • Files affected:
    • .nycrc or package.json (nyc config)
    • .github/workflows/test.yml (CI config)
    • README.md (badge)

Dependencies

  • Task 3 - Testing infrastructure configured
  • Task 52 - Frontmatter parser tests completed
  • Task 53 - Data provider tests completed
  • Task 54 - Status bar tests completed
  • Task 55 - Command tests completed
  • Task 56 - TreeDataProvider tests completed
  • Task 57 - Progress panel tests completed
  • Task 58 - File watcher tests completed
  • Task 59 - GitHub API tests completed
  • Task 60 - E2E tests completed

Effort Estimate

  • Size: M
  • Hours: 6
  • Parallel: false

Definition of Done

  • Code implemented
  • Tests written and passing
  • Documentation updated
  • Code reviewed
  • Coverage thresholds enforced in CI
  • Coverage reports accessible
  • Badge displayed in README
  • All coverage targets met (90-92%)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions