mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-21 01:15:10 +00:00
Some checks failed
SqlStore Integration Tests / test-postgres (3.12) (push) Failing after 1s
Integration Auth Tests / test-matrix (oauth2_token) (push) Failing after 1s
Test External Providers Installed via Module / test-external-providers-from-module (venv) (push) Has been skipped
Integration Tests (Replay) / Integration Tests (, , , client=, vision=) (push) Failing after 3s
Test Llama Stack Build / build-ubi9-container-distribution (push) Failing after 3s
Test Llama Stack Build / generate-matrix (push) Successful in 5s
Python Package Build Test / build (3.13) (push) Failing after 5s
Python Package Build Test / build (3.12) (push) Failing after 9s
Test Llama Stack Build / build-single-provider (push) Failing after 10s
Update ReadTheDocs / update-readthedocs (push) Failing after 10s
Vector IO Integration Tests / test-matrix (push) Failing after 14s
Unit Tests / unit-tests (3.13) (push) Failing after 10s
Test Llama Stack Build / build-custom-container-distribution (push) Failing after 14s
Test External API and Providers / test-external (venv) (push) Failing after 13s
SqlStore Integration Tests / test-postgres (3.13) (push) Failing after 17s
Test Llama Stack Build / build (push) Failing after 9s
Unit Tests / unit-tests (3.12) (push) Failing after 14s
Pre-commit / pre-commit (push) Successful in 1m19s
See comment here:
https://github.com/llamastack/llama-stack/pull/3162#issuecomment-3192859097
-- TL;DR it is quite complex to invoke the recording workflow correctly
for an end developer writing tests. This script simplifies the work.
No more manual GitHub UI navigation!
## Script Functionality
- Auto-detects your current branch and associated PR
- Finds the right repository context (works from forks!)
- Runs the workflow where it can actually commit back
- Validates prerequisites and provides helpful error messages
## How to Use
First ensure you are on the branch which introduced a new test and want
it recorded. **Make sure you have pushed this branch remotely, easiest
is to create a PR.**
```
# Record tests for current branch
./scripts/github/schedule-record-workflow.sh
# Record specific test subdirectories
./scripts/github/schedule-record-workflow.sh --test-subdirs "agents,inference"
# Record with vision tests enabled
./scripts/github/schedule-record-workflow.sh --run-vision-tests
# Record tests matching a pattern
./scripts/github/schedule-record-workflow.sh --test-pattern "test_streaming"
```
## Test Plan
Ran `./scripts/github/schedule-record-workflow.sh -s inference -k
tool_choice` which started
4820409329
which successfully committed recorded outputs.
70 lines
2.4 KiB
YAML
70 lines
2.4 KiB
YAML
# This workflow should be run manually when needing to re-record tests. This happens when you have
|
|
# - added a new test
|
|
# - or changed an existing test such that a new inference call is made
|
|
# You should make a PR and then run this workflow on that PR branch. The workflow will re-record the
|
|
# tests and commit the recordings to the PR branch.
|
|
name: Integration Tests (Record)
|
|
|
|
run-name: Run the integration test suite from tests/integration
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
test-subdirs:
|
|
description: 'Comma-separated list of test subdirectories to run'
|
|
type: string
|
|
default: ''
|
|
test-provider:
|
|
description: 'Test against a specific provider'
|
|
type: string
|
|
default: 'ollama'
|
|
run-vision-tests:
|
|
description: 'Whether to run vision tests'
|
|
type: boolean
|
|
default: false
|
|
test-pattern:
|
|
description: 'Regex pattern to pass to pytest -k'
|
|
type: string
|
|
default: ''
|
|
|
|
jobs:
|
|
record-tests:
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
steps:
|
|
- name: Echo workflow inputs
|
|
run: |
|
|
echo "::group::Workflow Inputs"
|
|
echo "test-subdirs: ${{ inputs.test-subdirs }}"
|
|
echo "test-provider: ${{ inputs.test-provider }}"
|
|
echo "run-vision-tests: ${{ inputs.run-vision-tests }}"
|
|
echo "test-pattern: ${{ inputs.test-pattern }}"
|
|
echo "branch: ${{ github.ref_name }}"
|
|
echo "::endgroup::"
|
|
|
|
- name: Checkout repository
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup test environment
|
|
uses: ./.github/actions/setup-test-environment
|
|
with:
|
|
python-version: "3.12" # Use single Python version for recording
|
|
client-version: "latest"
|
|
provider: ${{ inputs.test-provider || 'ollama' }}
|
|
run-vision-tests: ${{ inputs.run-vision-tests }}
|
|
inference-mode: 'record'
|
|
|
|
- name: Run and record tests
|
|
uses: ./.github/actions/run-and-record-tests
|
|
with:
|
|
test-pattern: ${{ inputs.test-pattern }}
|
|
test-subdirs: ${{ inputs.test-subdirs }}
|
|
stack-config: 'server:ci-tests' # recording must be done with server since more tests are run
|
|
provider: ${{ inputs.test-provider || 'ollama' }}
|
|
inference-mode: 'record'
|
|
run-vision-tests: ${{ inputs.run-vision-tests }}
|