Skip to content

fix: always upload coverage to Codecov even if threshold check fails#107

Merged
lenasolarova merged 2 commits into
RedHatInsights:masterfrom
lenasolarova:fix/codecov-upload-always-run
Apr 24, 2026
Merged

fix: always upload coverage to Codecov even if threshold check fails#107
lenasolarova merged 2 commits into
RedHatInsights:masterfrom
lenasolarova:fix/codecov-upload-always-run

Conversation

@lenasolarova
Copy link
Copy Markdown
Contributor

@lenasolarova lenasolarova commented Apr 24, 2026

Problem

The Codecov upload step ran after the coverage threshold check. When a PR failed the threshold, the job exited early and the Codecov upload never ran — so Codecov posted no PR comments and showed no checks.

Additionally, a failing coverage threshold was blocking PR merges entirely.

Fix

Add continue-on-error: true to the coverage threshold step. The check still runs and logs the result, but it no longer blocks the job. Codecov always receives the report, giving visibility into coverage trends without gating merges on an arbitrary threshold.

The Codecov upload step was gated after the coverage threshold check.
When a PR fails the threshold, the upload never ran, so Codecov posted
no comments and showed no checks on those PRs.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@lenasolarova lenasolarova requested review from a team and InsightsDroid as code owners April 24, 2026 07:18
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 24, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 4a823cd7-3ded-4aff-a028-fa174a686610

📥 Commits

Reviewing files that changed from the base of the PR and between d027f45 and 525bb0b.

📒 Files selected for processing (1)
  • .github/workflows/gotests.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/gotests.yaml

Summary by CodeRabbit

  • Chores
    • Made the coverage upload step tolerant of failures so coverage data is still attempted when enabled, ensuring workflows proceed and coverage is collected even if earlier steps fail.

Walkthrough

The GitHub Actions workflow .github/workflows/gotests.yaml is updated so the "Retrieve code coverage" step is tolerant of failures by adding continue-on-error: true; the step remains conditional on inputs.coverage == true.

Changes

Cohort / File(s) Summary
GitHub Actions Workflow
​.github/workflows/gotests.yaml
Added continue-on-error: true to the "Retrieve code coverage" step so a non-zero exit from the coverage script does not fail the workflow; the step's condition remains inputs.coverage == true.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The PR title accurately describes the main change: adding continue-on-error to the coverage threshold step to ensure Codecov upload always runs.
Description check ✅ Passed The PR description is directly related to the changeset, clearly explaining the problem, the fix applied, and the rationale for the change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Coverage check now uses continue-on-error so the job does not fail on
threshold violations. Codecov always receives the report regardless of
coverage level, giving visibility without blocking merges.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@lenasolarova lenasolarova merged commit b4fcf97 into RedHatInsights:master Apr 24, 2026
3 checks passed
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.

3 participants