Skip to content

Commit 839679c

Browse files
committed
debugging
1 parent 922e5e0 commit 839679c

File tree

1 file changed

+37
-3
lines changed

1 file changed

+37
-3
lines changed

.github/workflows/test.yml

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,27 @@ jobs:
4646

4747
- name: Verify installation
4848
run: |
49-
python -c "import github_projects_mcp; print('Package imported successfully')"
50-
python -c "from github_projects_mcp.server import mcp; print('MCP server imported successfully')"
49+
echo "=== VERIFYING PACKAGE INSTALLATION ==="
50+
python -c "import sys; print(f'Python version: {sys.version}')"
51+
python -c "import github_projects_mcp; print('✅ Package imported successfully')"
52+
python -c "from github_projects_mcp.server import mcp; print('✅ MCP server imported successfully')"
53+
python -c "import pytest; print(f'✅ Pytest version: {pytest.__version__}')"
54+
echo "=== CHECKING TEST IMPORTS ==="
55+
python -c "
56+
import sys
57+
import os
58+
sys.path.insert(0, os.path.join(os.getcwd(), 'tests'))
59+
try:
60+
import conftest
61+
print('✅ conftest imported successfully')
62+
except Exception as e:
63+
print(f'❌ conftest import failed: {e}')
64+
try:
65+
from tests.test_compatibility import TestCompatibility
66+
print('✅ test_compatibility imported successfully')
67+
except Exception as e:
68+
print(f'❌ test_compatibility import failed: {e}')
69+
"
5170
5271
- name: Create test environment file
5372
run: |
@@ -124,12 +143,27 @@ jobs:
124143
echo "- TEST_ORG_NAME: $TEST_ORG_NAME"
125144
echo "- TEST_PROJECT_ID: $TEST_PROJECT_ID"
126145
echo ""
146+
147+
# First try to collect tests only to isolate collection issues
148+
echo "=== TESTING PYTEST COLLECTION ==="
149+
pytest --collect-only tests/ -q
150+
collection_exit_code=$?
151+
echo "Collection exit code: $collection_exit_code"
152+
153+
if [ "$collection_exit_code" -ne 0 ]; then
154+
echo "❌ Test collection failed, trying with verbose output..."
155+
pytest --collect-only tests/ -v
156+
fi
157+
158+
echo "=== RUNNING FULL TEST SUITE ==="
127159
pytest tests/ -v --tb=short --durations=10 --disable-warnings > test_output.txt 2>&1
128160
pytest_exit_code=$?
129161
echo "Pytest exit code: $pytest_exit_code"
130162
131-
# Check if tests functionally passed (look for PASSED status)
163+
# Always show the output for debugging
164+
echo "=== PYTEST OUTPUT START ==="
132165
cat test_output.txt
166+
echo "=== PYTEST OUTPUT END ==="
133167
passed_count=$(grep "PASSED" test_output.txt | grep -v "DEBUG\|INFO" | wc -l)
134168
failed_count=$(grep "FAILED" test_output.txt | grep -v "DEBUG\|INFO\|ERROR" | wc -l)
135169

0 commit comments

Comments
 (0)