feat(langchain): Add Google Gemini , Vertex AI and Ollama model support #54
Workflow file for this run
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: Python Interpreter CI | |
| on: | |
| push: | |
| branches: [main, dev] | |
| paths: | |
| - "python-interpreter/**" | |
| - ".github/workflows/python-interpreter.yml" | |
| pull_request: | |
| branches: [main, dev] | |
| paths: | |
| - "python-interpreter/**" | |
| - ".github/workflows/python-interpreter.yml" | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: python-interpreter | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: uv sync --dev | |
| - name: Run tests | |
| run: uv run pytest | |
| - name: Check formatting | |
| run: uv run ruff format --check . | |
| - name: Lint with ruff | |
| run: uv run ruff check . | |
| docker: | |
| runs-on: ubuntu-latest | |
| needs: test | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| permissions: | |
| packages: write | |
| defaults: | |
| run: | |
| working-directory: python-interpreter | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Determine image name | |
| id: meta | |
| env: | |
| OWNER: ${{ github.repository_owner }} | |
| run: | | |
| # GHCR requires lowercase repository names | |
| OWNER_LOWER=$(echo "$OWNER" | tr '[:upper:]' '[:lower:]') | |
| echo "image_name=ghcr.io/$OWNER_LOWER/afm-langchain-interpreter" >> $GITHUB_OUTPUT | |
| - name: Build and push full image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: python-interpreter | |
| push: true | |
| platforms: linux/amd64,linux/arm64 | |
| build-args: VARIANT=full | |
| tags: | | |
| ${{ steps.meta.outputs.image_name }}:latest | |
| ${{ steps.meta.outputs.image_name }}:${{ github.sha }} | |
| labels: | | |
| org.opencontainers.image.source=https://github.com/${{ github.repository }} | |
| org.opencontainers.image.revision=${{ github.sha }} | |
| org.opencontainers.image.title=AFM LangChain Interpreter | |
| org.opencontainers.image.licenses=Apache-2.0 | |
| annotations: | | |
| index:org.opencontainers.image.source=https://github.com/${{ github.repository }} | |
| index:org.opencontainers.image.licenses=Apache-2.0 | |
| - name: Build and push slim image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: python-interpreter | |
| push: true | |
| platforms: linux/amd64,linux/arm64 | |
| build-args: VARIANT=slim | |
| tags: | | |
| ${{ steps.meta.outputs.image_name }}:slim | |
| ${{ steps.meta.outputs.image_name }}:${{ github.sha }}-slim | |
| labels: | | |
| org.opencontainers.image.source=https://github.com/${{ github.repository }} | |
| org.opencontainers.image.revision=${{ github.sha }} | |
| org.opencontainers.image.title=AFM LangChain Interpreter (Slim) | |
| org.opencontainers.image.licenses=Apache-2.0 | |
| annotations: | | |
| index:org.opencontainers.image.source=https://github.com/${{ github.repository }} | |
| index:org.opencontainers.image.licenses=Apache-2.0 |