Merge pull request #10 from ODSCGoogleHackhathon/medgemmaGeminiAgent #25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: MedAnnotator CI | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Cache dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Lint with flake8 | |
| run: | | |
| pip install flake8 | |
| # Stop the build if there are Python syntax errors or undefined names | |
| flake8 src --count --select=E9,F63,F7,F82 --show-source --statistics | |
| # Exit-zero treats all errors as warnings | |
| flake8 src --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
| - name: Check code formatting with black | |
| run: | | |
| pip install black | |
| black --check src/ | |
| - name: Type check with mypy (optional) | |
| continue-on-error: true | |
| run: | | |
| pip install mypy | |
| mypy src/ --ignore-missing-imports || true | |
| - name: Run smoke tests | |
| env: | |
| GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} | |
| run: | | |
| chmod +x TEST.sh | |
| ./TEST.sh | |
| - name: Test imports | |
| run: | | |
| python -c "from src.config import settings; print('Config OK')" | |
| python -c "from src.schemas import AnnotationOutput; print('Schemas OK')" | |
| - name: Check documentation exists | |
| run: | | |
| test -f ARCHITECTURE.md || exit 1 | |
| test -f EXPLANATION.md || exit 1 | |
| test -f DEMO.md || exit 1 | |
| test -f README.md || exit 1 | |
| echo "All required documentation files present" |