Skip to content

🔧 server: enable vitest coverage only in CI - #1279

Open
aguxez wants to merge 1 commit into
mainfrom
test-perf
Open

🔧 server: enable vitest coverage only in CI#1279
aguxez wants to merge 1 commit into
mainfrom
test-perf

Conversation

@aguxez

@aguxez aguxez commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

what

one-line change in server/vitest.config.mts: vitest coverage runs only when CI is set. CI behavior is unchanged — github actions sets CI=true, so codecov unit reports, the e2e lcov upload, and junit test results all stay exactly as they are.

-    coverage: { enabled: true, reporter: ["lcov"] },
+    coverage: { enabled: !!env.CI, reporter: ["lcov"] },

why

coverage instrumentation was always on, including local runs, where nobody reads the report. measured on a 2-core vps (same worktree, same node_modules, only the flag differs):

scenario coverage on (main) coverage off delta
harness-free set (18 files, 256 tests) 3:03 1:24 −54%
auth api file w/ harness (40 tests) 1:28 1:01 −30%
single light file (statement, 7 tests) 1:02 0:38 −38%

Summary by CodeRabbit

  • Tests
    • Code coverage reporting now runs only in continuous integration environments, while retaining LCOV report generation.

@changeset-bot

changeset-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 1462792

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@aguxez
aguxez marked this pull request as ready for review September 1, 2026 17:04
@aguxez
aguxez requested a review from nfmelendez as a code owner September 1, 2026 17:04

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 98e832cf76

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread server/vitest.config.mts
@aguxez aguxez changed the title coverage on only in CI 🔧 server: enable vitest coverage only in CI Sep 2, 2026
@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Team

Run ID: ac9a3f52-a867-486d-b151-9f10fa500058

📥 Commits

Reviewing files that changed from the base of the PR and between 8337797 and 1462792.

📒 Files selected for processing (1)
  • server/vitest.config.mts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


Walkthrough

Vitest coverage collection now runs only in CI environments. The lcov reporter remains unchanged.

Changes

Vitest coverage configuration

Layer / File(s) Summary
Conditional coverage enablement
server/vitest.config.mts
The coverage.enabled flag now uses !!env.CI instead of true. The lcov reporter remains configured.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 14627

Coverage remains enabled for CI runs and local tests run without instrumentation; no current merge-blocking risk is identified.

Suggested reviewers: cruzdanilo, mainqueg

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: Vitest coverage is enabled only in CI for the server.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test-perf
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch test-perf

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.05%. Comparing base (8337797) to head (1462792).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1279      +/-   ##
==========================================
+ Coverage   72.51%   73.05%   +0.53%     
==========================================
  Files         275      276       +1     
  Lines       13256    13259       +3     
  Branches     4607     4613       +6     
==========================================
+ Hits         9613     9686      +73     
+ Misses       3306     3236      -70     
  Partials      337      337              
Flag Coverage Δ
e2e 73.04% <ø> (+0.53%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant