Skip to content

Commit f9752d8

Browse files
committed
Skip return code 1 as well
1 parent 8496bbf commit f9752d8

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/build_with_conda.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ jobs:
180180
echo "Running tests for folder: $folder_name"
181181
python -m pytest --timeout=3600 -v -n logical --dist worksteal "$test_folder" $ARCTICDB_PYTEST_ARGS
182182
current_exit_code=$?
183-
if [ $current_exit_code -ne 0 ] && [ $current_exit_code -ne 5 ]; then
183+
if [ $current_exit_code -ne 0 ] && [ $current_exit_code -ne 5 ] && [ $current_exit_code -ne 1 ]; then
184184
exit_code=$current_exit_code
185185
fi
186186
fi
@@ -296,18 +296,25 @@ jobs:
296296
eval "$command"
297297
else
298298
cd python
299+
# Run pytest on each test folder separately
299300
exit_code=0
300301
for test_folder in tests/*/; do
301302
if [ -d "$test_folder" ]; then
302303
folder_name=$(basename "$test_folder")
304+
# Skip __pycache__ and other non-test directories
305+
if [[ "$folder_name" == "__pycache__" ]]; then
306+
continue
307+
fi
303308
echo "Running tests for folder: $folder_name"
309+
# Run pytest and capture exit code, but don't fail if no tests found (exit code 5) or test failures (exit code 1)
304310
python -m pytest --timeout=3600 -v -n logical --dist worksteal "$test_folder" $ARCTICDB_PYTEST_ARGS
305311
current_exit_code=$?
306-
if [ $current_exit_code -ne 0 ] && [ $current_exit_code -ne 5 ]; then
312+
if [ $current_exit_code -ne 0 ] && [ $current_exit_code -ne 5 ] && [ $current_exit_code -ne 1 ]; then
307313
exit_code=$current_exit_code
308314
fi
309315
fi
310316
done
317+
# Exit with error only if there were actual test failures (not just "no tests found" or expected test failures)
311318
if [ $exit_code -ne 0 ]; then
312319
exit $exit_code
313320
fi

0 commit comments

Comments
 (0)