|
47 | 47 | |
48 | 48 | - name: Install project dependencies |
49 | 49 | run: | |
| 50 | + # Install package in editable mode first |
50 | 51 | pip install --no-cache-dir -e ".[dev]" |
51 | 52 | # Install remaining dependencies that aren't in dev extras |
52 | 53 | pip install --no-cache-dir \ |
@@ -89,14 +90,26 @@ jobs: |
89 | 90 | pytz>=2023.3 \ |
90 | 91 | qdrant-client>=1.7.0 |
91 | 92 | |
| 93 | + - name: Verify installation |
| 94 | + env: |
| 95 | + PYTHONPATH: ${{ github.workspace }} |
| 96 | + run: | |
| 97 | + export PYTHONPATH=${{ github.workspace }}:$PYTHONPATH |
| 98 | + python -c "import sys; print('Python version:', sys.version)" |
| 99 | + python -c "import sys; print('Python path:', sys.path)" |
| 100 | + python -c "import app; print('✓ App imported successfully')" || (echo "✗ App import failed" && exit 1) |
| 101 | + python -c "from app.utils.config import GEMINI_API_KEY; print('✓ Config imported')" || echo "⚠ Config import warning" |
| 102 | + |
92 | 103 | - name: Run tests |
93 | 104 | env: |
94 | 105 | # Set dummy API keys for testing (tests should handle missing keys gracefully) |
95 | 106 | GEMINI_API_KEY: "test_key_1234567890abcdef" |
96 | 107 | NCBI_API_KEY: "test_ncbi_key_1234567890" |
97 | 108 | EMAIL: "test@example.com" |
| 109 | + PYTHONPATH: ${{ github.workspace }} |
98 | 110 | run: | |
99 | | - pytest tests/ -v --tb=short --cov=app --cov-report=xml --cov-report=term-missing |
| 111 | + export PYTHONPATH=${{ github.workspace }}:$PYTHONPATH |
| 112 | + pytest tests/ -v --tb=short --maxfail=10 --cov=app --cov-report=xml --cov-report=term-missing |
100 | 113 | |
101 | 114 | - name: Upload coverage to Codecov |
102 | 115 | uses: codecov/codecov-action@v4 |
@@ -131,7 +144,7 @@ jobs: |
131 | 144 | |
132 | 145 | - name: Lint with flake8 |
133 | 146 | run: | |
134 | | - flake8 app/ tests/ cli.py main.py --max-line-length=120 --extend-ignore=E203,W503 --exclude=__pycache__,*.pyc |
| 147 | + flake8 app/ tests/ cli.py main.py --max-line-length=120 --extend-ignore=E203,W503,E501 --exclude=__pycache__,*.pyc |
135 | 148 |
|
136 | 149 | type-check: |
137 | 150 | name: Type Check |
|
0 commit comments