ci(codecov): collect Rust coverage and upload with OIDC

AS
3d ago
+39-3

User description

This PR was created by an AI agent (OpenHands) on behalf of the repository owner.

What changed

  • .github/workflows/ci.yml: the Rust job now runs the suite under cargo llvm-cov and uploads backend/lcov.info to Codecov with GitHub OIDC (use_oidc: true + id-token: write). The toolchain adds llvm-tools-preview, and cargo-llvm-cov is installed with taiki-e/install-action.
  • codecov.yml: project and patch status targets plus the PR comment layout.

Why

The repository has no coverage data in Codecov (activated: false), so Codecov cannot comment on or gate pull requests. OIDC avoids a stored CODECOV_TOKEN secret.

Verification

The CI workflow runs on this PR. Test with coverage should pass, and Upload coverage to Codecov should report a non-zero token length and a successful upload.

@ashcoft can click here to continue refining the PR


Summary by cubic

Adds backend Rust coverage collection and uploads it to Codecov, so pull requests can be commented on and gated with coverage data. Uploads use GitHub OIDC instead of a stored CODECOV_TOKEN secret.

The Rust CI job now runs tests under cargo llvm-cov and uploads backend/lcov.info to Codecov. The workflow gains id-token: write permission for the OIDC flow, and codecov.yml configures project and patch status targets plus the comment layout, ignoring frontend/** and backend/tests/**.

Summary by Sourcery

Enable Rust coverage reporting in CI and integrate it with Codecov without requiring a stored repository token.

Enhancements:

  • Add Rust coverage collection and Codecov reporting to the backend CI job using GitHub OIDC authentication.
  • Configure Codecov project and patch coverage thresholds, pull request comments, and excluded paths.

CI:

  • Grant the CI workflow OIDC permissions and install the tooling required for Rust coverage generation.

This change is Reviewable


CodeAnt-AI Description

Report Rust test coverage on pull requests

What Changed

  • Rust CI now collects test coverage and uploads it to Codecov for pull requests
  • Codecov can show project and changed-line coverage results, with a coverage summary in the PR comment
  • Coverage reporting excludes frontend files and backend test files

Impact

✅ Rust coverage visible on pull requests
✅ Coverage changes summarized in PR comments
✅ No stored Codecov token required

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.