Skip to content

Commit c8ff1fe

Browse files
committed
Fix/treat pytest exit 5 (no tests collected) as success
The release pipeline runs `make test MARKER="integration"` across non-video paths. There are no `@pytest.mark.integration` tests in those paths, so pytest deselects all 579 collected items and exits with code 5 ("no tests collected"). make treats that as a failure, so every "Test (integration) / Non-video tests (3.x)" matrix cell reports failure and the `release` job's `needs:` cannot be satisfied. Example: https://github.com/GetStream/stream-py/actions/runs/26416959683. Wrap the `test` and `test-video` recipes so exit code 5 is converted to 0 (with a log line) while every other non-zero code still propagates. The fix is symmetric across both recipes because either group may have an empty marker selection in the future.
1 parent 20bcf68 commit c8ff1fe

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,13 @@ TY_EXCLUDES := \
5656

5757
## Run non-video tests (chat, feeds, moderation, etc.)
5858
test:
59-
uv run pytest -m "$(MARKER)" tests/ getstream/ $(VIDEO_IGNORE) $(MANUAL_IGNORE)
59+
@uv run pytest -m "$(MARKER)" tests/ getstream/ $(VIDEO_IGNORE) $(MANUAL_IGNORE); \
60+
ec=$$?; if [ $$ec -eq 5 ]; then echo "No tests matched marker '$(MARKER)' — treating as success."; exit 0; else exit $$ec; fi
6061

6162
## Run video/WebRTC tests only
6263
test-video:
63-
uv run pytest -m "$(MARKER)" $(VIDEO_PATHS)
64+
@uv run pytest -m "$(MARKER)" $(VIDEO_PATHS); \
65+
ec=$$?; if [ $$ec -eq 5 ]; then echo "No tests matched marker '$(MARKER)' — treating as success."; exit 0; else exit $$ec; fi
6466

6567
## Run all tests (non-video + video), excluding manual tests
6668
test-all:

0 commit comments

Comments
 (0)