2023-08-08 21:55:25 +00:00
|
|
|
name: Scheduled tests
|
|
|
|
|
|
|
|
on:
|
2023-08-10 16:29:46 +00:00
|
|
|
workflow_dispatch: # Allows to trigger the workflow manually in GitHub UI
|
2023-08-09 16:44:25 +00:00
|
|
|
schedule:
|
2023-08-08 21:55:25 +00:00
|
|
|
- cron: '0 13 * * *'
|
|
|
|
|
|
|
|
env:
|
2024-01-17 16:51:20 +00:00
|
|
|
POETRY_VERSION: "1.7.1"
|
2023-08-08 21:55:25 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
2024-05-10 18:28:57 +00:00
|
|
|
fail-fast: false
|
2023-08-08 21:55:25 +00:00
|
|
|
matrix:
|
|
|
|
python-version:
|
|
|
|
- "3.8"
|
|
|
|
- "3.11"
|
2024-04-16 20:49:46 +00:00
|
|
|
working-directory:
|
|
|
|
- "libs/partners/openai"
|
|
|
|
- "libs/partners/anthropic"
|
2024-04-23 21:14:16 +00:00
|
|
|
- "libs/partners/ai21"
|
2024-04-16 20:49:46 +00:00
|
|
|
- "libs/partners/fireworks"
|
2024-04-23 21:14:16 +00:00
|
|
|
- "libs/partners/groq"
|
2024-04-16 20:49:46 +00:00
|
|
|
- "libs/partners/mistralai"
|
2024-04-23 21:14:16 +00:00
|
|
|
- "libs/partners/together"
|
2024-04-16 20:49:46 +00:00
|
|
|
name: Python ${{ matrix.python-version }} - ${{ matrix.working-directory }}
|
2023-08-08 21:55:25 +00:00
|
|
|
steps:
|
2023-10-23 14:01:33 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-08-22 20:07:53 +00:00
|
|
|
|
2023-08-08 21:55:25 +00:00
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
|
|
uses: "./.github/actions/poetry_setup"
|
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
2023-08-21 14:35:56 +00:00
|
|
|
poetry-version: ${{ env.POETRY_VERSION }}
|
2024-04-16 20:49:46 +00:00
|
|
|
working-directory: ${{ matrix.working-directory }}
|
2023-08-22 20:07:53 +00:00
|
|
|
cache-key: scheduled
|
|
|
|
|
2023-09-23 22:51:59 +00:00
|
|
|
- name: 'Authenticate to Google Cloud'
|
|
|
|
id: 'auth'
|
2024-01-01 22:02:43 +00:00
|
|
|
uses: google-github-actions/auth@v2
|
2023-09-23 22:51:59 +00:00
|
|
|
with:
|
|
|
|
credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}'
|
|
|
|
|
2023-08-22 20:07:53 +00:00
|
|
|
- name: Install dependencies
|
2024-04-16 20:49:46 +00:00
|
|
|
working-directory: ${{ matrix.working-directory }}
|
2023-08-22 20:07:53 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
echo "Running scheduled tests, installing dependencies with poetry..."
|
2023-12-08 18:37:44 +00:00
|
|
|
poetry install --with=test_integration,test
|
2023-08-22 20:07:53 +00:00
|
|
|
|
2024-04-16 20:49:46 +00:00
|
|
|
- name: Run integration tests
|
|
|
|
working-directory: ${{ matrix.working-directory }}
|
2023-08-22 20:07:53 +00:00
|
|
|
shell: bash
|
2023-08-08 21:55:25 +00:00
|
|
|
env:
|
|
|
|
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
2023-09-28 18:47:29 +00:00
|
|
|
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
2023-10-12 17:48:45 +00:00
|
|
|
AZURE_OPENAI_API_VERSION: ${{ secrets.AZURE_OPENAI_API_VERSION }}
|
|
|
|
AZURE_OPENAI_API_BASE: ${{ secrets.AZURE_OPENAI_API_BASE }}
|
|
|
|
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }}
|
2023-12-08 18:27:21 +00:00
|
|
|
AZURE_OPENAI_CHAT_DEPLOYMENT_NAME: ${{ secrets.AZURE_OPENAI_CHAT_DEPLOYMENT_NAME }}
|
|
|
|
AZURE_OPENAI_LLM_DEPLOYMENT_NAME: ${{ secrets.AZURE_OPENAI_LLM_DEPLOYMENT_NAME }}
|
|
|
|
AZURE_OPENAI_EMBEDDINGS_DEPLOYMENT_NAME: ${{ secrets.AZURE_OPENAI_EMBEDDINGS_DEPLOYMENT_NAME }}
|
2024-04-16 20:49:46 +00:00
|
|
|
AI21_API_KEY: ${{ secrets.AI21_API_KEY }}
|
2023-10-26 21:24:42 +00:00
|
|
|
FIREWORKS_API_KEY: ${{ secrets.FIREWORKS_API_KEY }}
|
2024-04-16 20:49:46 +00:00
|
|
|
GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }}
|
|
|
|
MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }}
|
|
|
|
TOGETHER_API_KEY: ${{ secrets.TOGETHER_API_KEY }}
|
2023-08-08 21:55:25 +00:00
|
|
|
run: |
|
2024-04-16 20:49:46 +00:00
|
|
|
make integration_test
|
2023-10-04 15:35:55 +00:00
|
|
|
|
|
|
|
- name: Ensure the tests did not create any additional files
|
2024-04-16 20:49:46 +00:00
|
|
|
working-directory: ${{ matrix.working-directory }}
|
2023-10-04 15:35:55 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
set -eu
|
|
|
|
|
|
|
|
STATUS="$(git status)"
|
|
|
|
echo "$STATUS"
|
|
|
|
|
|
|
|
# grep will exit non-zero if the target message isn't found,
|
|
|
|
# and `set -e` above will cause the step to fail.
|
|
|
|
echo "$STATUS" | grep 'nothing to commit, working tree clean'
|