Skip to content

Commit f514b11

Browse files
baijumclaude
andcommitted
fix: use pytest exit code for test detection instead of grep
pytest --collect-only exits 0 when tests exist, 5 when none found. Previous grep-based check matched "test" in "no tests ran" summary. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 99908b6 commit f514b11

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
run: |
2020
pip install -r requirements.txt
2121
pip install pytest
22-
if python -m pytest --collect-only -q 2>/dev/null | grep -q "test"; then
22+
if python -m pytest --collect-only -q >/dev/null 2>&1; then
2323
pytest --tb=short
2424
else
2525
echo "No tests found, skipping"

0 commit comments

Comments
 (0)