Refactor SDK with fine-tuning, prediction, files #92
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: Main CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| workflow_call: | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| environment: dev | |
| strategy: | |
| matrix: | |
| python-version: ['3.10', '3.11', '3.12'] | |
| defaults: | |
| run: | |
| shell: bash -el {0} | |
| env: | |
| CACHE_NUMBER: 0 | |
| steps: | |
| - name: Checkout git repo | |
| uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pip | |
| key: pip-${{ hashFiles('requirements/requirements*.txt') }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('MANIFEST.in') }}-${{ env.CACHE_NUMBER }} | |
| restore-keys: | | |
| pip- | |
| - name: Install base dependencies | |
| run: | | |
| which python | |
| python -m pip install --upgrade pip | |
| pip install -e '.[test,all]' | |
| if: steps.cache.outputs.cache-hit != 'true' | |
| - name: Quality Check | |
| uses: pre-commit/[email protected] | |
| continue-on-error: true | |
| - name: Test base installation | |
| env: | |
| VLMRUN_BASE_URL: ${{ vars.VLMRUN_BASE_URL }} | |
| VLMRUN_API_KEY: ${{ secrets.VLMRUN_API_KEY }} | |
| run: | | |
| # Test base installation first to verify dependency isolation | |
| pip install -e . | |
| pytest tests/common/test_dependencies.py::test_base_dependencies -v | |
| - name: Run all tests | |
| env: | |
| VLMRUN_BASE_URL: ${{ vars.VLMRUN_BASE_URL }} | |
| VLMRUN_API_KEY: ${{ secrets.VLMRUN_API_KEY }} | |
| run: | | |
| # Install all extras and run complete test suite | |
| pip install -e '.[all]' | |
| pytest tests/common/test_dependencies.py -v | |
| make test |