Skip to content

feat: added codecov online#11

Merged
mahimairaja merged 1 commit intomainfrom
feat/add-codecov
Mar 21, 2026
Merged

feat: added codecov online#11
mahimairaja merged 1 commit intomainfrom
feat/add-codecov

Conversation

@mahimairaja
Copy link
Copy Markdown
Collaborator

@mahimairaja mahimairaja commented Mar 21, 2026

Summary by CodeRabbit

  • Chores

    • Integrated code coverage reporting into CI/CD pipeline to track test coverage metrics
    • Updated .gitignore with additional IDE-specific patterns
  • Documentation

    • Added code coverage badge to README for visibility of project testing quality

@mahimairaja mahimairaja self-assigned this Mar 21, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 21, 2026

📝 Walkthrough

Walkthrough

Added code coverage instrumentation to the CI workflow by installing pytest-cov, executing tests with coverage reporting, and uploading results to Codecov. Updated .gitignore to exclude .cursor files. Added Codecov badge to README.

Changes

Cohort / File(s) Summary
CI & Coverage
.github/workflows/test.yml, README.md
Integrated pytest coverage reporting with Codecov upload step; added corresponding coverage badge to README.
Configuration
.gitignore
Added .cursor to ignored files list and fixed missing newline at EOF.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐰 Coverage badges shine so bright,
Tests now capture every sight,
With pytest-cov's watchful eye,
Code quality reaches toward the sky! 📊

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: added codecov online' directly relates to the main changes in the pull request, which involve integrating Codecov for code coverage tracking and adding a coverage badge.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/add-codecov

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 and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
.github/workflows/test.yml (1)

28-36: Consider uploading coverage from a single matrix job to reduce CI noise.

Right now every Python version generates and uploads coverage. Limiting coverage upload to one version (while still running tests on all versions) keeps CI faster and avoids duplicate coverage uploads.

♻️ Suggested workflow refinement
-      - name: Run tests with coverage
-        run: pytest --cov=openrtc --cov-report=xml
+      - name: Run tests
+        run: |
+          if [ "${{ matrix.python-version }}" = "3.12" ]; then
+            pytest --cov=openrtc --cov-report=xml
+          else
+            pytest
+          fi

       - name: Upload coverage to Codecov
+        if: matrix.python-version == '3.12'
         uses: codecov/codecov-action@v5
         with:
           token: ${{ secrets.CODECOV_TOKEN }}
           files: coverage.xml
           fail_ci_if_error: false
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/test.yml around lines 28 - 36, Multiple matrix entries are
each generating and uploading coverage; limit uploads to a single matrix entry
to avoid duplicate reports by making the "Upload coverage to Codecov" step
conditional or moving it into a single dedicated job. Update the workflow so
either the existing "Upload coverage to Codecov" step includes an if: condition
(e.g., if: matrix.python-version == '<choose-one-version>') tied to the matrix
used by "Run tests with coverage", or create a separate job (e.g.,
"upload-coverage") that depends on the matrix test job and runs only once to
upload coverage; reference the job/step names "Run tests with coverage" and
"Upload coverage to Codecov" when making the change. Ensure tests still run for
all matrix Python versions but only one run publishes coverage.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/workflows/test.yml:
- Around line 28-36: Multiple matrix entries are each generating and uploading
coverage; limit uploads to a single matrix entry to avoid duplicate reports by
making the "Upload coverage to Codecov" step conditional or moving it into a
single dedicated job. Update the workflow so either the existing "Upload
coverage to Codecov" step includes an if: condition (e.g., if:
matrix.python-version == '<choose-one-version>') tied to the matrix used by "Run
tests with coverage", or create a separate job (e.g., "upload-coverage") that
depends on the matrix test job and runs only once to upload coverage; reference
the job/step names "Run tests with coverage" and "Upload coverage to Codecov"
when making the change. Ensure tests still run for all matrix Python versions
but only one run publishes coverage.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c6c3168a-d5e4-4081-8830-ab86a0fbe36b

📥 Commits

Reviewing files that changed from the base of the PR and between ee0561b and 374674d.

📒 Files selected for processing (3)
  • .github/workflows/test.yml
  • .gitignore
  • README.md

@mahimairaja mahimairaja merged commit c901fa7 into main Mar 21, 2026
6 checks passed
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 21, 2026

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@mahimairaja mahimairaja deleted the feat/add-codecov branch March 23, 2026 17:07
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.

2 participants