Skip to content

The agent that grows with you

ci: print the zero-selection diagnostic instead of dying first

etherneta298dbcfe300
diff --git a/.github/workflows/tests-os.yml b/.github/workflows/tests-os.yml
index 921f092d15c..a91f6557218 100644
--- a/.github/workflows/tests-os.yml
+++ b/.github/workflows/tests-os.yml
@@ -127,11 +127,16 @@ jobs:
echo "selected $# file(s) for ${{ matrix.marker }}:"
cat "$LIST"
+ # ``shell: bash`` runs this script with ``-e`` injected, which
+ # ``set -uo pipefail`` above does not clear. A bare pytest call
+ # would therefore abort the script on any non-zero exit and the
+ # exit-5 branch below would be unreachable dead code — the job
+ # would still fail red, but the diagnostic would never print.
+ status=0
uv run --no-sync python -m pytest \
"$@" \
-m "${{ matrix.marker }} and not integration" \
- -v --tb=short
- status=$?
+ -v --tb=short || status=$?
if [ "$status" -eq 5 ]; then
echo "::error::No tests matched -m ${{ matrix.marker }}. Either the" \
"marker was renamed/dropped or selection is broken — this job" \