Skip to content

Conversation

@keithwillcode
Copy link
Contributor

What does this PR do?

Adds code coverage tracking for packages that runs on every PR and compares coverage against the base branch. The check fails if coverage decreases by more than 0.5%.

Key changes:

  • New code-coverage.yml workflow with three jobs: coverage (PR), coverage-base (base branch), compare-coverage
  • Vitest coverage configuration targeting only packages/**/*.{ts,tsx} files
  • New test:coverage script in package.json
  • Integration into pr.yml and all-checks.yml workflows

Important notes for review:

  • The coverage check is NOT added to required checks - it runs but won't block merges initially
  • The 0.5% threshold was chosen as a reasonable default - please confirm this is acceptable
  • When the base branch doesn't have test:coverage script, it defaults to 0% coverage (so this PR will pass)

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. N/A - internal CI change
  • I confirm automated tests are in place that prove my fix is effective or that my feature works. N/A - this adds test infrastructure

How should this be tested?

  1. Merge this PR and observe the Coverage workflow running on subsequent PRs
  2. The workflow should generate a coverage comparison table in the GitHub Actions summary
  3. To test the failure case: create a PR that removes tests and verify the coverage check fails

Checklist

  • My code follows the style guidelines of this project
  • I have checked if my changes generate no new warnings

Link to Devin run: https://app.devin.ai/sessions/033caae18c514cc8b8546707cf3819e1
Requested by: @keithwillcode

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants