fix: add explicit package discovery configuration #7
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: CI | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| python-version: ['3.12', '3.13'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Cache pip dependencies | |
| uses: actions/cache@v4 | |
| 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 setuptools>=61.0 wheel | |
| echo "Installing package in editable mode..." | |
| pip install -e . -v | |
| echo "Checking installation..." | |
| python -c "import openspace_openhands_evolution; print('✅ Package imported successfully')" | |
| pip install pytest pytest-asyncio litellm pyyaml | |
| - name: Run tests | |
| run: | | |
| pytest tests/ -v --tb=short | |
| - name: Test CLI installation | |
| run: | | |
| python -m openspace_openhands_evolution --help | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install linting tools | |
| run: | | |
| pip install flake8 black mypy | |
| - name: Run flake8 | |
| run: | | |
| flake8 openspace_openhands_evolution/ --count --select=E9,F63,F7,F82 --show-source --statistics || true | |
| - name: Check code formatting with black | |
| run: | | |
| black --check openspace_openhands_evolution/ || true | |
| - name: Type checking with mypy | |
| run: | | |
| mypy openspace_openhands_evolution/ --ignore-missing-imports || true | |
| docker-build: | |
| runs-on: ubuntu-latest | |
| needs: [test, lint] | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build Docker image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| push: false | |
| tags: openspace-evolution:latest | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Test Docker image | |
| run: | | |
| docker run --rm openspace-evolution:latest python -c "import openspace_openhands_evolution; print('✅ Docker build successful')" | |
| production-check: | |
| runs-on: ubuntu-latest | |
| needs: [test, lint] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install dependencies | |
| run: | | |
| pip install setuptools>=61.0 wheel | |
| pip install -e . | |
| - name: Run production readiness check | |
| run: | | |
| python check_production_ready.py |