Files
2026-07-13 13:12:33 +08:00

102 lines
3.2 KiB
YAML

name: Live Search E2E
"on":
workflow_dispatch:
inputs:
run_extended_matrix:
description: "Run the broader live provider/API matrix"
required: false
type: boolean
default: false
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
live-search-e2e:
name: Live search provider and agent gates
runs-on: ubuntu-latest
timeout-minutes: 30
env:
PYTHONPATH: ${{ github.workspace }}
OPENSQUILLA_TURN_CALL_LOG: "0"
OPENSQUILLA_LIVE_SEARCH: "1"
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
OPENROUTER_BASE_URL: ${{ vars.OPENROUTER_BASE_URL || 'https://openrouter.ai/api/v1' }}
LLM_TEST_MODEL: ${{ vars.LLM_TEST_MODEL || 'openai/gpt-4o-mini' }}
TAVILY_API_KEY: ${{ secrets.TAVILY_API_KEY }}
BRAVE_SEARCH_API_KEY: ${{ secrets.BRAVE_SEARCH_API_KEY }}
EXA_API_KEY: ${{ secrets.EXA_API_KEY }}
FIRECRAWL_API_KEY: ${{ secrets.FIRECRAWL_API_KEY }}
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Configure runtime directories
shell: bash
run: |
printf 'OPENSQUILLA_STATE_DIR=%s/opensquilla-state\n' "$RUNNER_TEMP" >> "$GITHUB_ENV"
printf 'OPENSQUILLA_LOG_DIR=%s/opensquilla-logs\n' "$RUNNER_TEMP" >> "$GITHUB_ENV"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Set up uv
uses: astral-sh/setup-uv@v5
- name: Install dependencies
run: uv sync --extra dev --extra recommended --frozen
- name: Fail if required live search secrets are missing
shell: bash
run: |
if [ -z "$OPENROUTER_API_KEY" ]; then
echo "OPENROUTER_API_KEY GitHub secret is required"
exit 1
fi
if [ -z "$TAVILY_API_KEY" ]; then
echo "TAVILY_API_KEY GitHub secret is required"
exit 1
fi
if [ "${{ inputs.run_extended_matrix }}" = "true" ] \
&& [ -z "$BRAVE_SEARCH_API_KEY" ]; then
echo "BRAVE_SEARCH_API_KEY GitHub secret is required for the extended matrix"
exit 1
fi
if [ "${{ inputs.run_extended_matrix }}" = "true" ] \
&& [ -z "$EXA_API_KEY" ]; then
echo "EXA_API_KEY GitHub secret is required for the extended matrix"
exit 1
fi
if [ "${{ inputs.run_extended_matrix }}" = "true" ] \
&& [ -z "$FIRECRAWL_API_KEY" ]; then
echo "FIRECRAWL_API_KEY GitHub secret is required for the extended matrix"
exit 1
fi
- name: Run core live search gates
run: |
timeout 180s uv run pytest \
tests/live/test_search_retrieval_live.py \
tests/live/test_web_search_agent_e2e.py \
-m live_search \
-q -s
- name: Run extended live search matrix
if: ${{ inputs.run_extended_matrix }}
env:
OPENSQUILLA_LIVE_SEARCH_MATRIX: "1"
run: |
timeout 240s uv run pytest \
tests/live/test_search_api_matrix_live.py \
-m live_search \
-q -s