Skip to content

Frontend Coverage Integration (Vitest + Codecov) #137

@kevalyq

Description

@kevalyq

Parent Epic: SecPal/.github#189

🎯 Goal

Configure Vitest code coverage reporting and integrate Codecov into the frontend repository CI pipeline.

📝 Tasks

  • Configure coverage in vitest.config.ts (using existing @vitest/coverage-v8 package)
  • Add coverage generation to package.json scripts (already has test:coverage)
  • Modify .github/workflows/quality.yml to generate and upload coverage
  • Add coverage badge to frontend/README.md
  • Verify coverage reports appear in Codecov dashboard
  • Test coverage on sample PR

✅ Acceptance Criteria

  • Vitest generates coverage report in JSON/LCOV format
  • CI workflow uploads coverage to Codecov
  • Coverage badge displays in README
  • All existing tests pass (131 tests)
  • Coverage visible in Codecov dashboard
  • Preflight checks pass

🔧 Technical Details

Files to modify:

  • frontend/vitest.config.ts - Add coverage configuration
  • frontend/.github/workflows/quality.yml - Add coverage upload to vitest job
  • frontend/README.md - Add Codecov badge

Dependencies:

  • Codecov GitHub App (organization-level)
  • @vitest/coverage-v8 (already installed)

📚 References

🔗 Related


Estimated Effort: 1-2 hours
Priority: High

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions