|
46 | 46 |
|
47 | 47 | - name: Verify installation |
48 | 48 | 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 | +" |
51 | 70 | |
52 | 71 | - name: Create test environment file |
53 | 72 | run: | |
@@ -124,12 +143,27 @@ jobs: |
124 | 143 | echo "- TEST_ORG_NAME: $TEST_ORG_NAME" |
125 | 144 | echo "- TEST_PROJECT_ID: $TEST_PROJECT_ID" |
126 | 145 | 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 ===" |
127 | 159 | pytest tests/ -v --tb=short --durations=10 --disable-warnings > test_output.txt 2>&1 |
128 | 160 | pytest_exit_code=$? |
129 | 161 | echo "Pytest exit code: $pytest_exit_code" |
130 | 162 | |
131 | | - # Check if tests functionally passed (look for PASSED status) |
| 163 | + # Always show the output for debugging |
| 164 | + echo "=== PYTEST OUTPUT START ===" |
132 | 165 | cat test_output.txt |
| 166 | + echo "=== PYTEST OUTPUT END ===" |
133 | 167 | passed_count=$(grep "PASSED" test_output.txt | grep -v "DEBUG\|INFO" | wc -l) |
134 | 168 | failed_count=$(grep "FAILED" test_output.txt | grep -v "DEBUG\|INFO\|ERROR" | wc -l) |
135 | 169 | |
|
0 commit comments