Skip to content

Conversation

@koxudaxi
Copy link
Owner

@koxudaxi koxudaxi commented Jan 6, 2026

Summary by CodeRabbit

  • Chores
    • Updated CI/CD workflow to ensure coverage upload executes regardless of previous step outcomes.
    • Reordered test command execution sequence in the test configuration.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 6, 2026

📝 Walkthrough

Walkthrough

Configuration 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

Cohort / File(s) Summary
Test & Coverage Configuration
.github/workflows/test.yaml, tox.ini
Added conditional if: success() || failure() to Codecov upload step to allow execution regardless of prior step outcomes; reordered coverage report command in tox to execute after diff-cover instead of immediately after coverage combine.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 Our tests now hop in different ways,
Coverage uploads through sunny and rainy days,
The diff-cover leads before the report's call,
Workflows refined for the best of all!

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main objective of ensuring codecov upload runs even when coverage checks fail, which aligns with the changes made to add conditional logic in the GitHub Actions workflow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2026

📚 Docs Preview: https://pr-2944.datamodel-code-generator.pages.dev

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 6, 2026

CodSpeed Performance Report

Merging this PR will improve performance by 21.12%

Comparing fix/codecov-upload-on-coverage-failure (9fd4f0f) with main (e57ebd2)

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

Summary

⚡ 11 improved benchmarks
⏩ 98 skipped benchmarks1

Performance Changes

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

  1. 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.

Copy link

@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.

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

📥 Commits

Reviewing files that changed from the base of the PR and between e57ebd2 and 9fd4f0f.

📒 Files selected for processing (2)
  • .github/workflows/test.yaml
  • tox.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=100 check to the end ensures that both the XML/HTML generation and the diff-cover analysis 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
Copy link

codecov bot commented Jan 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (d1d6f4f) to head (9fd4f0f).
⚠️ Report is 5 commits behind head on main.

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     
Flag Coverage Δ
unittests 100.00% <ø> (ø)

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

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@koxudaxi koxudaxi merged commit dedd3a9 into main Jan 6, 2026
36 checks passed
@koxudaxi koxudaxi deleted the fix/codecov-upload-on-coverage-failure branch January 6, 2026 18:26
@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2026

Breaking Change Analysis

Result: No breaking changes detected

Reasoning: PR #2944 contains only CI/CD infrastructure changes: 1) Adding if: success() || failure() to the codecov upload step in GitHub Actions to ensure coverage is uploaded even when tests fail, and 2) Reordering commands in tox.ini to generate coverage XML/HTML files before running the coverage report check that can fail. These changes do not affect the datamodel-code-generator library itself - no changes to code generation, templates, API/CLI, default behavior, Python version support, or error handling. These are purely internal development workflow improvements.


This analysis was performed by Claude Code Action

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants