Ensure codecov upload runs even when coverage check fails#2944
Conversation
📝 WalkthroughWalkthroughConfiguration adjustments to test and coverage workflows: the Codecov upload step now runs conditionally based on step success or failure, and coverage report analysis was reordered to run after diff-cover in the test pipeline. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
Pre-merge checks✅ Passed checks (3 passed)
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. Comment |
|
📚 Docs Preview: https://pr-2944.datamodel-code-generator.pages.dev |
CodSpeed Performance ReportMerging this PR will improve performance by 21.12%Comparing
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | WallTime | test_perf_large_models_pydantic_v2 |
3.7 s | 3.1 s | +21.12% |
| ⚡ | WallTime | test_perf_graphql_style_pydantic_v2 |
825.7 ms | 703.7 ms | +17.33% |
| ⚡ | WallTime | test_perf_stripe_style_pydantic_v2 |
2 s | 1.7 s | +18.96% |
| ⚡ | WallTime | test_perf_duplicate_names |
1,012.5 ms | 847.2 ms | +19.52% |
| ⚡ | WallTime | test_perf_openapi_large |
2.9 s | 2.5 s | +19.44% |
| ⚡ | WallTime | test_perf_deep_nested |
6.2 s | 5.1 s | +19.89% |
| ⚡ | WallTime | test_perf_multiple_files_input |
3.8 s | 3.1 s | +21% |
| ⚡ | WallTime | test_perf_complex_refs |
2 s | 1.7 s | +17.62% |
| ⚡ | WallTime | test_perf_all_options_enabled |
6.8 s | 5.7 s | +19.32% |
| ⚡ | WallTime | test_perf_kubernetes_style_pydantic_v2 |
2.7 s | 2.2 s | +20.19% |
| ⚡ | WallTime | test_perf_aws_style_openapi_pydantic_v2 |
2 s | 1.7 s | +18.21% |
Footnotes
-
98 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.github/workflows/test.yaml (1)
126-130: Consider adding the same conditional to HTML report upload.For consistency and to maximize diagnostic value, consider adding
if: success() || failure()to the "Upload HTML report" step as well. This would ensure the HTML coverage report is available for inspection even when the coverage check fails.🔎 Proposed enhancement
- name: Upload HTML report + if: success() || failure() uses: actions/upload-artifact@v4 with: name: html-report path: .tox/htmlcov
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/test.yamltox.ini
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
- GitHub Check: 3.14 on macOS
- GitHub Check: 3.10 on macOS
- GitHub Check: 3.11 on Windows
- GitHub Check: 3.11 on macOS
- GitHub Check: 3.12 on macOS
- GitHub Check: 3.10 on Windows
- GitHub Check: 3.12 on Windows
- GitHub Check: 3.13 on Windows
- GitHub Check: 3.14 on Windows
- GitHub Check: Analyze (python)
- GitHub Check: benchmarks
🔇 Additional comments (2)
tox.ini (1)
93-93: LGTM! Reordering supports the PR objective.Moving the
coverage report --fail-under=100check to the end ensures that both the XML/HTML generation and thediff-coveranalysis complete successfully before the potentially failing coverage threshold check. This complements the workflow change that uploads coverage data regardless of this check's outcome..github/workflows/test.yaml (1)
132-132: LGTM! Change ensures diagnostic data upload on failure.The conditional
if: success() || failure()correctly ensures that coverage data is uploaded to Codecov regardless of whether the coverage check passes or fails. This directly addresses the PR objective and follows standard CI/CD practices for diagnostic data collection.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2944 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 92 94 +2
Lines 16989 17686 +697
Branches 1979 2037 +58
==========================================
+ Hits 16989 17686 +697
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Breaking Change AnalysisResult: No breaking changes detected Reasoning: PR #2944 contains only CI/CD infrastructure changes: 1) Adding This analysis was performed by Claude Code Action |
|
🎉 Released in 0.53.0 This PR is now available in the latest release. See the release notes for details. |
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.