Python Integration Tests #1116
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
# | |
# This workflow will run all python integrations tests. | |
# | |
name: Python Integration Tests | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ "main"] | |
paths: | |
- 'python/**' | |
schedule: | |
- cron: '0 */12 * * *' # Run every 12 hours: midnight UTC and noon UTC | |
permissions: | |
contents: read | |
jobs: | |
python-integration-tests: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
max-parallel: 1 | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
os: [ ubuntu-latest, windows-latest, macos-latest ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install poetry pytest | |
cd python && poetry install --with hugging_face --with chromadb | |
- name: Run Integration Tests | |
shell: bash | |
env: # Set Azure credentials secret as an input | |
Python_Integration_Tests: Python_Integration_Tests | |
AzureOpenAI__Label: azure-text-davinci-003 | |
AzureOpenAIEmbedding__Label: azure-text-embedding-ada-002 | |
AzureOpenAI__DeploymentName: ${{ vars.AZUREOPENAI__DEPLOYMENTNAME }} | |
AzureOpenAIChat__DeploymentName: ${{ vars.AZUREOPENAI__CHAT__DEPLOYMENTNAME }} | |
AzureOpenAIEmbeddings__DeploymentName: ${{ vars.AZUREOPENAIEMBEDDING__DEPLOYMENTNAME }} | |
AzureOpenAI__Endpoint: ${{ secrets.AZUREOPENAI__ENDPOINT }} | |
AzureOpenAIEmbeddings__Endpoint: ${{ secrets.AZUREOPENAI__ENDPOINT }} | |
AzureOpenAI__ApiKey: ${{ secrets.AZUREOPENAI__APIKEY }} | |
AzureOpenAIEmbeddings__ApiKey: ${{ secrets.AZUREOPENAI__APIKEY }} | |
Bing__ApiKey: ${{ secrets.BING__APIKEY }} | |
OpenAI__ApiKey: ${{ secrets.OPENAI__APIKEY }} | |
run: | | |
cd python | |
poetry run pytest ./tests/integration | |