mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-22 16:12:25 +00:00
# What does this PR do?
Enable stainless-builds workflow to test preview SDKs by calling
integration-tests workflow with python_url parameter. Add stainless
matrix config for faster CI runs on SDK changes.
- Make integration-tests.yml reusable with workflow_call inputs
- Thread python_url through test setup actions to install preview SDK
- Add matrix_key parameter to generate_ci_matrix.py for custom matrices
- Update stainless-builds.yml to call integration tests with preview URL
This allows us to test a client on the PR introducing the new changes
before merging. Contributors can even write new tests using the
generated client which should pass on the PR, indicating that they will
pass on main upon merge
## Test Plan
see triggered action using the workflows on this branch:
5810594042
which installs the stainless SDK from the given url.
---------
Signed-off-by: Charlie Doern <cdoern@redhat.com>
57 lines
2.1 KiB
YAML
57 lines
2.1 KiB
YAML
name: Setup runner
|
|
description: Prepare a runner for the tests (install uv, python, project dependencies, etc.)
|
|
inputs:
|
|
python-version:
|
|
description: The Python version to use
|
|
required: false
|
|
default: "3.12"
|
|
client-version:
|
|
description: The llama-stack-client-python version to test against (latest or published)
|
|
required: false
|
|
default: "latest"
|
|
sdk_install_url:
|
|
description: 'URL to install Python SDK from (for testing preview builds). If provided, overrides client-version.'
|
|
required: false
|
|
default: ""
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@1e862dfacbd1d6d858c55d9b792c756523627244 # v7.1.4
|
|
with:
|
|
python-version: ${{ inputs.python-version }}
|
|
|
|
- name: Configure client installation
|
|
id: client-config
|
|
uses: ./.github/actions/install-llama-stack-client
|
|
with:
|
|
client-version: ${{ inputs.client-version }}
|
|
sdk_install_url: ${{ inputs.sdk_install_url }}
|
|
|
|
- name: Install dependencies
|
|
shell: bash
|
|
env:
|
|
UV_EXTRA_INDEX_URL: ${{ steps.client-config.outputs.uv-extra-index-url }}
|
|
run: |
|
|
# Export UV env vars for current step and persist to GITHUB_ENV for subsequent steps
|
|
if [ -n "$UV_EXTRA_INDEX_URL" ]; then
|
|
export UV_INDEX_STRATEGY=unsafe-best-match
|
|
echo "UV_EXTRA_INDEX_URL=$UV_EXTRA_INDEX_URL" >> $GITHUB_ENV
|
|
echo "UV_INDEX_STRATEGY=$UV_INDEX_STRATEGY" >> $GITHUB_ENV
|
|
echo "Exported UV environment variables for current and subsequent steps"
|
|
fi
|
|
|
|
echo "Updating project dependencies via uv sync"
|
|
uv sync --all-groups
|
|
|
|
echo "Installing ad-hoc dependencies"
|
|
uv pip install faiss-cpu
|
|
|
|
# Install specific client version after sync if needed
|
|
if [ "${{ steps.client-config.outputs.install-after-sync }}" = "true" ]; then
|
|
echo "Installing llama-stack-client from: ${{ steps.client-config.outputs.install-source }}"
|
|
uv pip install ${{ steps.client-config.outputs.install-source }}
|
|
fi
|
|
|
|
echo "Installed llama packages"
|
|
uv pip list | grep llama
|