-
Notifications
You must be signed in to change notification settings - Fork 3
At least report the coverage on the command line #757
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
WalkthroughA command was added to the CI workflow to output a coverage summary to the console during the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. ✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
| flux start | ||
| coverage run -a --omit="executorlib/_version.py,tests/*" -m unittest tests/test_fluxpythonspawner.py tests/test_fluxjobexecutor_plot.py tests/test_fluxjobexecutor.py tests/test_fluxclusterexecutor.py; | ||
| coverage report; | ||
| coverage xml | ||
| env: |
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.
🛠️ Refactor suggestion
Use && instead of ; to avoid masking test failures
The current chaining
flux start
coverage run -a … -m unittest …; coverage report; coverage xml
means the job’s exit status is that of coverage xml, not the unit-test invocation.
If any test fails, coverage run exits non-zero, but the subsequent commands still run and return 0, so the CI job can appear green while tests are red.
-flux start
-coverage run -a --omit="executorlib/_version.py,tests/*" -m unittest tests/test_fluxpythonspawner.py tests/test_fluxjobexecutor_plot.py tests/test_fluxjobexecutor.py tests/test_fluxclusterexecutor.py; coverage report; coverage xml
+flux start \
+coverage run -a --omit="executorlib/_version.py,tests/*" -m unittest \
+ tests/test_fluxpythonspawner.py \
+ tests/test_fluxjobexecutor_plot.py \
+ tests/test_fluxjobexecutor.py \
+ tests/test_fluxclusterexecutor.py && \
+coverage report && \
+coverage xmlUsing && (or set -e) ensures the step fails immediately on the first non-zero exit code, preserving proper CI signalling.
Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In .github/workflows/pipeline.yml around lines 256 to 260, the commands chaining
test execution and coverage reporting use semicolons, which causes the step to
report success even if tests fail. Replace the semicolons with `&&` between the
commands so that each command only runs if the previous one succeeded, ensuring
the CI job fails immediately on test failures.
Summary by CodeRabbit