File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -143,10 +143,22 @@ jobs:
143143 fi
144144
145145 echo "=== RUNNING FULL TEST SUITE ==="
146+ set +e # Don't exit on error
146147 pytest tests/ -v --tb=short --durations=10 --disable-warnings > test_output.txt 2>&1
147148 pytest_exit_code=$?
149+ set -e # Re-enable exit on error
148150 echo "Pytest exit code: $pytest_exit_code"
149151
152+ # Ensure output file exists and has content
153+ if [ ! -f test_output.txt ] || [ ! -s test_output.txt ]; then
154+ echo "WARNING: test_output.txt is missing or empty, trying simpler pytest run..."
155+ set +e
156+ pytest tests/ -v > test_output.txt 2>&1
157+ pytest_exit_code=$?
158+ set -e
159+ echo "Fallback pytest exit code: $pytest_exit_code"
160+ fi
161+
150162 # Always show the output for debugging
151163 echo "=== PYTEST OUTPUT START ==="
152164 cat test_output.txt
You can’t perform that action at this time.
0 commit comments