llama-stack-mirror/.github/actions/setup-test-environment/action.yml
Ashwin Bharambe afa9f08823 fix(ci): install client from release branch before uv sync
CI was failing on release branches because uv sync tried to resolve
llama-stack-client>=0.3.1rc1 from PyPI, but RC versions only exist on
test.pypi. The dependency resolution would fail before we could install
the client from git.

Solution: On release-X.Y.x branches, pre-install llama-stack-client
from the matching git branch before running uv sync. This satisfies
the RC version requirement in pyproject.toml and allows dependency
resolution to succeed.

Changes:
- setup-runner: Pre-install client from git on release branches
- pre-commit: Add same pre-install logic before uv sync
- setup-test-environment: Remove duplicate logic (now in setup-runner)

Example failure: 5415478835
2025-10-30 22:31:44 -07:00

55 lines
1.7 KiB
YAML

name: 'Setup Test Environment'
description: 'Common setup steps for integration tests including dependencies, providers, and build'
inputs:
python-version:
description: 'Python version to use'
required: true
client-version:
description: 'Client version (latest or published)'
required: true
setup:
description: 'Setup to configure (ollama, vllm, gpt, etc.)'
required: false
default: 'ollama'
suite:
description: 'Test suite to use: base, responses, vision, etc.'
required: false
default: ''
inference-mode:
description: 'Inference mode (record or replay)'
required: true
runs:
using: 'composite'
steps:
- name: Install dependencies
uses: ./.github/actions/setup-runner
with:
python-version: ${{ inputs.python-version }}
client-version: ${{ inputs.client-version }}
- name: Setup ollama
if: ${{ (inputs.setup == 'ollama' || inputs.setup == 'ollama-vision') && inputs.inference-mode == 'record' }}
uses: ./.github/actions/setup-ollama
with:
suite: ${{ inputs.suite }}
- name: Setup vllm
if: ${{ inputs.setup == 'vllm' && inputs.inference-mode == 'record' }}
uses: ./.github/actions/setup-vllm
- name: Build Llama Stack
shell: bash
run: |
# Client is already installed by setup-runner (handles both main and release branches)
echo "Building Llama Stack"
LLAMA_STACK_DIR=. \
uv run --no-sync llama stack list-deps ci-tests | xargs -L1 uv pip install
- name: Configure git for commits
shell: bash
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"