fix: add universal-2 fallback for languages unsupported by universal-… #62
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: PR to Testing Branch | |
| on: | |
| pull_request: | |
| branches: | |
| - testing | |
| types: [opened, synchronize, reopened] | |
| env: | |
| REGISTRY: registry.digitalocean.com/dbr-cr | |
| PYTHON_VERSION: "3.11" | |
| jobs: | |
| lint-and-type-check: | |
| name: Lint & Type Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Install dependencies | |
| run: | | |
| cd echo/server | |
| pip install -r requirements.lock | |
| - name: Run Ruff Lint | |
| run: | | |
| cd echo/server | |
| ruff check . | |
| - name: Run MyPy Type Check | |
| run: | | |
| cd echo/server | |
| mypy dembrane/ --ignore-missing-imports | |
| unit-tests: | |
| name: Unit Tests | |
| runs-on: ubuntu-latest | |
| env: | |
| # Required environment variables for config.py | |
| DIRECTUS_SECRET: test-secret | |
| DIRECTUS_TOKEN: test-token | |
| DATABASE_URL: postgresql+psycopg://test:test@localhost:5432/test | |
| REDIS_URL: redis://localhost:6379 | |
| OPENAI_API_KEY: sk-test-key | |
| ANTHROPIC_API_KEY: sk-ant-test-key | |
| STORAGE_S3_BUCKET: test-bucket | |
| STORAGE_S3_ENDPOINT: https://test.endpoint.com | |
| STORAGE_S3_KEY: test-key | |
| STORAGE_S3_SECRET: test-secret | |
| SMALL_LITELLM_MODEL: gpt-4o-mini | |
| SMALL_LITELLM_API_KEY: test-key | |
| SMALL_LITELLM_API_VERSION: "2024-06-01" | |
| SMALL_LITELLM_API_BASE: https://api.openai.com/v1 | |
| MEDIUM_LITELLM_MODEL: gpt-4o | |
| MEDIUM_LITELLM_API_KEY: test-key | |
| MEDIUM_LITELLM_API_VERSION: "2024-06-01" | |
| MEDIUM_LITELLM_API_BASE: https://api.openai.com/v1 | |
| LARGE_LITELLM_MODEL: gpt-4o | |
| LARGE_LITELLM_API_KEY: test-key | |
| LARGE_LITELLM_API_VERSION: "2024-06-01" | |
| LARGE_LITELLM_API_BASE: https://api.openai.com/v1 | |
| LIGHTRAG_LITELLM_MODEL: gpt-4o-mini | |
| LIGHTRAG_LITELLM_API_KEY: test-key | |
| LIGHTRAG_LITELLM_API_VERSION: "2024-06-01" | |
| LIGHTRAG_LITELLM_API_BASE: https://api.openai.com/v1 | |
| LIGHTRAG_LITELLM_AUDIOMODEL_MODEL: gpt-4o-audio | |
| LIGHTRAG_LITELLM_AUDIOMODEL_API_BASE: https://api.openai.com/v1 | |
| LIGHTRAG_LITELLM_AUDIOMODEL_API_KEY: test-key | |
| LIGHTRAG_LITELLM_AUDIOMODEL_API_VERSION: "2024-06-01" | |
| LIGHTRAG_LITELLM_TEXTSTRUCTUREMODEL_MODEL: gpt-4o-mini | |
| LIGHTRAG_LITELLM_TEXTSTRUCTUREMODEL_API_BASE: https://api.openai.com/v1 | |
| LIGHTRAG_LITELLM_TEXTSTRUCTUREMODEL_API_KEY: test-key | |
| LIGHTRAG_LITELLM_TEXTSTRUCTUREMODEL_API_VERSION: "2024-06-01" | |
| LIGHTRAG_LITELLM_EMBEDDING_MODEL: text-embedding-ada-002 | |
| LIGHTRAG_LITELLM_EMBEDDING_API_BASE: https://api.openai.com/v1 | |
| LIGHTRAG_LITELLM_EMBEDDING_API_KEY: test-key | |
| LIGHTRAG_LITELLM_EMBEDDING_API_VERSION: "2024-06-01" | |
| LIGHTRAG_LITELLM_INFERENCE_MODEL: claude-3-5-sonnet | |
| LIGHTRAG_LITELLM_INFERENCE_API_KEY: test-key | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Install dependencies | |
| run: | | |
| cd echo/server | |
| pip install -r requirements.lock | |
| - name: Run Unit Tests | |
| run: | | |
| cd echo/server | |
| pytest tests/ -v -m "not integration and not slow and not smoke" --maxfail=3 | |
| build-images: | |
| name: Build Docker Images (validation only) | |
| runs-on: ubuntu-latest | |
| needs: [lint-and-type-check, unit-tests] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build API Server Image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: ./echo/server | |
| file: ./echo/server/Dockerfile | |
| push: false | |
| tags: ${{ env.REGISTRY }}/dbr-echo-server:pr-${{ github.event.pull_request.number }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Build Directus Image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: ./echo/directus | |
| file: ./echo/directus/Dockerfile | |
| push: false | |
| tags: ${{ env.REGISTRY }}/dbr-echo-directus:pr-${{ github.event.pull_request.number }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| auto-merge: | |
| name: Auto-merge PR | |
| runs-on: ubuntu-latest | |
| needs: [build-images] | |
| permissions: | |
| pull-requests: write | |
| contents: write | |
| steps: | |
| - name: Auto-merge PR | |
| uses: pascalgn/automerge-action@v0.16.2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_AUTO_MERGE_TOKEN }} | |
| MERGE_LABELS: "" | |
| MERGE_METHOD: "squash" | |
| MERGE_COMMIT_MESSAGE: "pull-request-title" | |
| MERGE_RETRIES: 3 | |
| MERGE_RETRY_SLEEP: 10000 | |