ChromaDB Support for Python SDK #42
This file contains 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
# .github/workflows/python_tests.yml | |
name: Python Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request_target: | |
types: | |
- opened | |
- labeled | |
- synchronize | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
# We'll run if one of the following is met: | |
# 1. The 'okay-to-test' labeled has just been added to the PR. | |
# 2. A member or collaborator opens a PR or pushes new commits to it. | |
# 3. This is a push to the main branch. | |
if: | | |
(contains(github.event.pull_request.labels.*.name, 'okay-to-test') && github.event.action == 'labeled') || | |
contains(fromJson('["MEMBER", "COLLABORATOR"]'), github.event.pull_request.author_association) || | |
github.event_name == 'push' | |
steps: | |
# https://github.com/actions/checkout/issues/518 | |
- name: Check out code | |
uses: actions/checkout@v4 | |
with: | |
ref: "${{ github.event.pull_request.merge_commit_sha }}" | |
- name: Set up Docker | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y docker-compose-plugin | |
- name: Run Docker Compose | |
run: docker-compose -f docker-compose.yaml up --build | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
- name: Install server dependencies | |
# Spin up a server instance for testing against | |
run: | | |
make init-server | |
- name: Run tests | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
BILLING_RATE_INT_10K: ${{ secrets.BILLING_RATE_INT_10K }} | |
MASTER_API_KEY: ${{ secrets.MASTER_API_KEY }} | |
MASTER_CREDIT_AMOUNT: ${{ secrets.MASTER_CREDIT_AMOUNT }} | |
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }} | |
NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.NEXT_PUBLIC_SUPABASE_URL }} | |
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }} | |
PINECONE_ENVIRONMENT: ${{ secrets.PINECONE_ENVIRONMENT }} | |
PINECONE_INDEX_NAME: ${{ secrets.PINECONE_INDEX_NAME }} | |
SUPABASE_SERVICE_KEY: ${{ secrets.SUPABASE_SERVICE_KEY }} | |
run: | | |
make test |