-
-
Notifications
You must be signed in to change notification settings - Fork 427
Exclude perf tests from regular test runs #2817
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 WalkthroughWalkthroughThe pull request refactors test organization by narrowing CodSpeed instrumentation to run a single explicit performance test file and adding a pytest marker filter to exclude performance-marked tests from the standard test suite. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🔇 Additional comments (2)
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-2817.datamodel-code-generator.pages.dev |
There was a problem hiding this 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
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
tox.ini (1)
147-157: Performance tests are scattered across multiple files; perf environment may miss benchmarks outside test_performance.pyThe
[testenv:perf]configuration targets onlytests/main/test_performance.py, but the codebase has@pytest.mark.benchmarktests in:
tests/main/test_main_yaml.pytests/main/openapi/test_main_openapi.pytests/main/jsonschema/test_main_jsonschema.pyTo properly isolate performance testing, either:
- Move all
@pytest.mark.benchmarktests totests/main/test_performance.py, or- Update the perf environment to use
-m "perf or benchmark"to capture all performance tests
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/codspeed.yamltox.ini
🔇 Additional comments (2)
.github/workflows/codspeed.yaml (1)
34-34: LGTM! Simplified and explicit test targeting.The change to explicitly target
tests/main/test_performance.pyaligns well with the new[testenv:perf]configuration intox.ini. This approach is cleaner than using marker filters in the CI workflow.tox.ini (1)
40-40: Theperfmarker is already registered in pyproject.toml.No action needed. The marker is defined at line 228 of
pyproject.tomlas:markers = [ "perf: marks tests as performance tests (excluded from CI benchmarks)" ]. The code change is correct.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2817 +/- ##
==========================================
- Coverage 99.51% 98.72% -0.80%
==========================================
Files 89 90 +1
Lines 13856 14090 +234
Branches 1634 1658 +24
==========================================
+ Hits 13789 13910 +121
- Misses 36 149 +113
Partials 31 31
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:
|
CodSpeed Performance ReportMerging #2817 will create unknown performance changesComparing Summary
Benchmarks breakdown
Footnotes
|
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.