Skip to content

feat: Cloudflare Workers AI #30

feat: Cloudflare Workers AI

feat: Cloudflare Workers AI #30

Workflow file for this run

name: Test
on:
workflow_dispatch: { }
pull_request:
paths:
- chromadbx/**
- test/**
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
- name: Install dependencies
run: |
set -e
python -m pip install --upgrade pip
curl -sSL https://install.python-poetry.org | python3 -
- name: Install dependencies
run: |
set -e
poetry update --with dev
- name: Run pre-commit
shell: bash
run: |
poetry run pre-commit run --all-files trailing-whitespace
poetry run pre-commit run --all-files mixed-line-ending
poetry run pre-commit run --all-files end-of-file-fixer
poetry run pre-commit run --all-files requirements-txt-fixer
poetry run pre-commit run --all-files check-xml
poetry run pre-commit run --all-files check-merge-conflict
poetry run pre-commit run --all-files check-case-conflict
poetry run pre-commit run --all-files check-docstring-first
poetry run pre-commit run --all-files black
poetry run pre-commit run --all-files flake8
poetry run pre-commit run --all-files check-yaml
test:
runs-on: [ "ubuntu-latest" ]
needs: [ lint ]
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"
# - name: Install Helm
# uses: azure/setup-helm@v1
# with:
# version: v3.4.0
# - name: start minikube
# id: minikube
# uses: medyagh/setup-minikube@latest
# with:
# kubernetes-version: 1.27.3
# - name: Add helm repo
# run: |
# set -e
# helm repo add chromadb https://amikos-tech.github.io/chromadb-chart/
# helm repo update
# - name: Install chromadb
# run: |
# set -e
# helm install chromadb chromadb/chromadb --set chromadb.allowReset=true,chromadb.apiVersion=${{ matrix.chroma-version }},chromadb.auth.enabled=false
- name: Install dependencies
run: |
set -e
python -m pip install --upgrade pip
curl -sSL https://install.python-poetry.org | python3 -
# - name: Lint with flake8
# run: |
# set -e
# poetry update
# pre-commit run --from-ref HEAD~1 --to-ref HEAD
- name: Run tests
run: |
set -e
poetry update --with dev
poetry run pytest
env:
MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }}
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
CF_GATEWAY_ENDPOINT: ${{ secrets.CF_GATEWAY_ENDPOINT }}