Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ jobs:
run: >
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:
Comment on lines 256 to 260
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

⚠️ Potential issue

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 xml

Using && (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.

EXECUTORLIB_PMIX: "pmix"
Expand Down
Loading