-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
305 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Docker build and publish | ||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
name: docker build and publish | ||
steps: | ||
- name: Git checkout | ||
uses: actions/checkout@v3 | ||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- name: Read Version from File | ||
id: version | ||
run: echo "VERSION=$(cat VERSION)" >> $GITHUB_ENV | ||
- name: Build Docker image | ||
run: | | ||
docker build . -t datastax/astra-assistants:${{ env.VERSION }} | ||
- name: Push Docker image | ||
run: | | ||
docker push datastax/astra-assistants:${{ env.VERSION }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,280 @@ | ||
name: Run tests | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
run-http-tests: | ||
runs-on: ubuntu-latest | ||
name: run http tests | ||
env: | ||
ASTRA_DB_APPLICATION_TOKEN: ${{ secrets.ASTRA_DB_APPLICATION_TOKEN }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_REGION_NAME: ${{ secrets.AWS_REGION_NAME }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
base_url: ${{ secrets.BASE_URL }} | ||
COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }} | ||
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
PERPLEXITYAI_API_KEY: ${{ secrets.PERPLEXITYAI_API_KEY }} | ||
|
||
steps: | ||
- name: Git checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up Python 3.10.12 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.10.12' | ||
- name: Install Poetry | ||
run: | | ||
curl -sSL https://install.python-poetry.org | python3 - | ||
- name: Check Poetry Version | ||
run: poetry --version | ||
- name: Configure Poetry to Use Python 3.10.12 | ||
run: poetry env use python3.10 | ||
- name: get dependencies | ||
run: | | ||
poetry install | ||
- name: run tests | ||
run: | | ||
poetry run pytest -s --disable-warnings tests/http/ | ||
run-openai-sdk-tests: | ||
runs-on: ubuntu-latest | ||
name: run openai-sdk tests | ||
env: | ||
ASTRA_DB_APPLICATION_TOKEN: ${{ secrets.ASTRA_DB_APPLICATION_TOKEN }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_REGION_NAME: ${{ secrets.AWS_REGION_NAME }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
base_url: ${{ secrets.BASE_URL }} | ||
COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }} | ||
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
PERPLEXITYAI_API_KEY: ${{ secrets.PERPLEXITYAI_API_KEY }} | ||
|
||
steps: | ||
- name: Git checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up Python 3.10.12 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.10.12' | ||
- name: Install Poetry | ||
run: | | ||
curl -sSL https://install.python-poetry.org | python3 - | ||
- name: Check Poetry Version | ||
run: poetry --version | ||
- name: Configure Poetry to Use Python 3.10.12 | ||
run: poetry env use python3.10 | ||
- name: get dependencies | ||
run: | | ||
poetry install | ||
- name: run tests | ||
run: | | ||
poetry run pytest -s --disable-warnings tests/openai-sdk/ | ||
run-streaming-assistants-tests-chat: | ||
runs-on: ubuntu-latest | ||
name: run streaming-assistants chat tests | ||
env: | ||
ASTRA_DB_APPLICATION_TOKEN: ${{ secrets.ASTRA_DB_APPLICATION_TOKEN }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_REGION_NAME: ${{ secrets.AWS_REGION_NAME }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
base_url: ${{ secrets.BASE_URL }} | ||
COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }} | ||
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
PERPLEXITYAI_API_KEY: ${{ secrets.PERPLEXITYAI_API_KEY }} | ||
|
||
steps: | ||
- name: Git checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up Python 3.10.12 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.10.12' | ||
- name: Install Poetry | ||
run: | | ||
curl -sSL https://install.python-poetry.org | python3 - | ||
- name: Check Poetry Version | ||
run: poetry --version | ||
- name: Configure Poetry to Use Python 3.10.12 | ||
run: poetry env use python3.10 | ||
- name: get dependencies | ||
run: | | ||
poetry install | ||
- name: run tests | ||
run: | | ||
poetry run pytest -s --disable-warnings tests/streaming-assistants/test_chat_completion.py | ||
run-streaming-assistants-tests-embedding: | ||
runs-on: ubuntu-latest | ||
name: run streaming-assistants embedding tests | ||
env: | ||
ASTRA_DB_APPLICATION_TOKEN: ${{ secrets.ASTRA_DB_APPLICATION_TOKEN }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_REGION_NAME: ${{ secrets.AWS_REGION_NAME }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
base_url: ${{ secrets.BASE_URL }} | ||
COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }} | ||
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
PERPLEXITYAI_API_KEY: ${{ secrets.PERPLEXITYAI_API_KEY }} | ||
|
||
steps: | ||
- name: Git checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up Python 3.10.12 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.10.12' | ||
- name: Install Poetry | ||
run: | | ||
curl -sSL https://install.python-poetry.org | python3 - | ||
- name: Check Poetry Version | ||
run: poetry --version | ||
- name: Configure Poetry to Use Python 3.10.12 | ||
run: poetry env use python3.10 | ||
- name: get dependencies | ||
run: | | ||
poetry install | ||
- name: run tests | ||
run: | | ||
poetry run pytest -s --disable-warnings tests/streaming-assistants/test_embedding.py | ||
run-streaming-assistants-tests-file-embedding: | ||
runs-on: ubuntu-latest | ||
name: run streaming-assistants file embedding tests | ||
env: | ||
ASTRA_DB_APPLICATION_TOKEN: ${{ secrets.ASTRA_DB_APPLICATION_TOKEN }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_REGION_NAME: ${{ secrets.AWS_REGION_NAME }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
base_url: ${{ secrets.BASE_URL }} | ||
COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }} | ||
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
PERPLEXITYAI_API_KEY: ${{ secrets.PERPLEXITYAI_API_KEY }} | ||
|
||
steps: | ||
- name: Git checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up Python 3.10.12 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.10.12' | ||
- name: Install Poetry | ||
run: | | ||
curl -sSL https://install.python-poetry.org | python3 - | ||
- name: Check Poetry Version | ||
run: poetry --version | ||
- name: Configure Poetry to Use Python 3.10.12 | ||
run: poetry env use python3.10 | ||
- name: get dependencies | ||
run: | | ||
poetry install | ||
- name: run tests | ||
run: | | ||
poetry run pytest -s --disable-warnings tests/streaming-assistants/test_file_embedding.py | ||
run-streaming-assistants-tests-function-calling: | ||
runs-on: ubuntu-latest | ||
name: run streaming-assistants function calling tests | ||
env: | ||
ASTRA_DB_APPLICATION_TOKEN: ${{ secrets.ASTRA_DB_APPLICATION_TOKEN }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_REGION_NAME: ${{ secrets.AWS_REGION_NAME }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
base_url: ${{ secrets.BASE_URL }} | ||
COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }} | ||
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
PERPLEXITYAI_API_KEY: ${{ secrets.PERPLEXITYAI_API_KEY }} | ||
|
||
steps: | ||
- name: Git checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up Python 3.10.12 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.10.12' | ||
- name: Install Poetry | ||
run: | | ||
curl -sSL https://install.python-poetry.org | python3 - | ||
- name: Check Poetry Version | ||
run: poetry --version | ||
- name: Configure Poetry to Use Python 3.10.12 | ||
run: poetry env use python3.10 | ||
- name: get dependencies | ||
run: | | ||
poetry install | ||
- name: run tests | ||
run: | | ||
poetry run pytest -s --disable-warnings tests/streaming-assistants/test_function_calling.py | ||
run-streaming-assistants-tests-run: | ||
runs-on: ubuntu-latest | ||
name: run streaming-assistants run tests | ||
env: | ||
ASTRA_DB_APPLICATION_TOKEN: ${{ secrets.ASTRA_DB_APPLICATION_TOKEN }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_REGION_NAME: ${{ secrets.AWS_REGION_NAME }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
base_url: ${{ secrets.BASE_URL }} | ||
COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }} | ||
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
PERPLEXITYAI_API_KEY: ${{ secrets.PERPLEXITYAI_API_KEY }} | ||
|
||
steps: | ||
- name: Git checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up Python 3.10.12 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.10.12' | ||
- name: Install Poetry | ||
run: | | ||
curl -sSL https://install.python-poetry.org | python3 - | ||
- name: Check Poetry Version | ||
run: poetry --version | ||
- name: Configure Poetry to Use Python 3.10.12 | ||
run: poetry env use python3.10 | ||
- name: get dependencies | ||
run: | | ||
poetry install | ||
- name: run tests | ||
run: | | ||
poetry run pytest -s --disable-warnings tests/streaming-assistants/test_run.py | ||
run-streaming-assistants-tests-run-retrieval: | ||
runs-on: ubuntu-latest | ||
name: run streaming-assistants run retrieval tests | ||
env: | ||
ASTRA_DB_APPLICATION_TOKEN: ${{ secrets.ASTRA_DB_APPLICATION_TOKEN }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_REGION_NAME: ${{ secrets.AWS_REGION_NAME }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
base_url: ${{ secrets.BASE_URL }} | ||
COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }} | ||
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
PERPLEXITYAI_API_KEY: ${{ secrets.PERPLEXITYAI_API_KEY }} | ||
|
||
steps: | ||
- name: Git checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up Python 3.10.12 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.10.12' | ||
- name: Install Poetry | ||
run: | | ||
curl -sSL https://install.python-poetry.org | python3 - | ||
- name: Check Poetry Version | ||
run: poetry --version | ||
- name: Configure Poetry to Use Python 3.10.12 | ||
run: poetry env use python3.10 | ||
- name: get dependencies | ||
run: | | ||
poetry install | ||
- name: run tests | ||
run: | | ||
poetry run pytest -s --disable-warnings tests/streaming-assistants/test_run_retreival.py |