Skip to content

Commit

Permalink
client optional dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
phact committed Jun 19, 2024
1 parent c054530 commit 135b188
Show file tree
Hide file tree
Showing 3 changed files with 299 additions and 2 deletions.
56 changes: 55 additions & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1267,4 +1267,58 @@ jobs:
popd
# Kill the server
kill $SERVER_PID
kill $SERVER_PID
run-tools-tests:
runs-on: ubuntu-latest
name: run tools 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 }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }}

steps:
- name: Git checkout
uses: actions/checkout@v3
- name: Set up Python 3.11.8
uses: actions/setup-python@v2
with:
python-version: '3.11.8'
- 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.11.8
working-directory: ./client
run: poetry env use python3.10
- name: get client dependencies
working-directory: ./client
run: |
poetry install --with optional
- name: get server dependencies
run: |
poetry install
- name: run tests
run: |
# Start the server in the background
poetry run python run.py &
SERVER_PID=$!
# Wait for the server to be ready
sleep 10
# Run the client tests that depend on the server
pushd client
poetry run pytest -s --disable-warnings tests/tools
popd
# Kill the server
kill $SERVER_PID
Loading

0 comments on commit 135b188

Please sign in to comment.