Skip to content

Commit b5436de

Browse files
committed
Merge remote-tracking branch 'upstream/main' into leseb/api-spec-comparison-v2
2 parents 384c9cc + d30a603 commit b5436de

139 files changed

Lines changed: 20793 additions & 29221 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,46 @@
11
name: Setup Ollama
2-
description: Start Ollama
2+
description: Start Ollama and pull required models
33
inputs:
44
suite:
55
description: 'Test suite to use: base, responses, vision, etc.'
66
required: false
77
default: ''
8+
setup:
9+
description: 'Setup name (ollama, ollama-vision, ollama-reasoning, etc.)'
10+
required: false
11+
default: 'ollama'
812
runs:
913
using: "composite"
1014
steps:
1115
- name: Start Ollama
1216
shell: bash
1317
run: |
14-
if [ "${{ inputs.suite }}" == "vision" ]; then
15-
image="ollama-with-vision-model"
18+
echo "Starting Ollama server..."
19+
docker run -d --name ollama -p 11434:11434 ollama/ollama
20+
echo "Verifying Ollama status..."
21+
timeout 30 bash -c 'while ! curl -s -L http://127.0.0.1:11434; do sleep 1 && echo "."; done'
22+
echo "Ollama is ready"
23+
24+
- name: Pull models
25+
shell: bash
26+
env:
27+
SETUP: ${{ inputs.setup }}
28+
SUITE: ${{ inputs.suite }}
29+
run: |
30+
pull_model() {
31+
echo "Pulling $1..."
32+
docker exec ollama ollama pull "$1"
33+
}
34+
35+
if [ "$SUITE" == "vision" ]; then
36+
pull_model "llama3.2-vision:11b"
37+
pull_model "nomic-embed-text:v1.5"
38+
elif [ "$SETUP" == "ollama-reasoning" ]; then
39+
pull_model "deepseek-r1:1.5b"
1640
else
17-
image="ollama-with-models"
41+
pull_model "llama3.2:3b-instruct-fp16"
42+
pull_model "nomic-embed-text:v1.5"
43+
pull_model "llama-guard3:1b"
1844
fi
1945
20-
echo "Starting Ollama with image: $image"
21-
docker run -d --name ollama -p 11434:11434 docker.io/ogx/$image
22-
echo "Verifying Ollama status..."
23-
timeout 30 bash -c 'while ! curl -s -L http://127.0.0.1:11434; do sleep 1 && echo "."; done'
46+
echo "All models pulled successfully"

.github/actions/setup-test-environment/action.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,14 @@ runs:
6767
" 2>/dev/null || echo "Dataset download failed (may already be cached)"
6868
6969
- name: Setup ollama
70-
if: ${{ (inputs.setup == 'ollama' || inputs.setup == 'ollama-vision') && inputs.inference-mode == 'record' }}
70+
if: ${{ startsWith(inputs.setup, 'ollama') && inputs.inference-mode != 'replay' }}
7171
uses: ./.github/actions/setup-ollama
7272
with:
7373
suite: ${{ inputs.suite }}
74+
setup: ${{ inputs.setup }}
7475

7576
- name: Setup vllm
76-
if: ${{ inputs.setup == 'vllm' && inputs.inference-mode == 'record' }}
77+
if: ${{ startsWith(inputs.setup, 'vllm') && inputs.inference-mode != 'replay' }}
7778
uses: ./.github/actions/setup-vllm
7879

7980
- name: Start Postgres service

.github/workflows/codeql.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ on:
44
pull_request:
55
# PRs are checked for new issues
66
branches: [ "main" ]
7-
# Limit scans to changes in the .github directory, bash scripts are not scanned anyway
87
paths:
98
- '.github/**'
9+
- 'src/**'
1010

1111
jobs:
1212
analyze:
@@ -15,10 +15,7 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
# actions is the most specific language option for
19-
# codeql does NOT support Bash
20-
# In case javascript is used in workflows, that should be added or replace
21-
language: [ 'actions' ]
18+
language: [ 'actions', 'python' ]
2219

2320
steps:
2421
- name: Checkout repository

.github/workflows/integration-auth-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ jobs:
116116
table_name: openai_conversations
117117
backend: sql_default
118118
prompts:
119-
namespace: prompts
120-
backend: kv_default
119+
table_name: prompts
120+
backend: sql_default
121121
server:
122122
port: 8321
123123
auth:

.github/workflows/integration-responses-conversations-auth-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ jobs:
164164
table_name: openai_conversations
165165
backend: sql_default
166166
prompts:
167-
namespace: prompts
168-
backend: kv_default
167+
table_name: prompts
168+
backend: sql_default
169169
models:
170170
- model_id: openai/gpt-4o
171171
model_type: llm

.github/workflows/record-integration-tests.yml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# SECURITY NOTE: This workflow uses pull_request (not pull_request_target) for security.
77
# Security measures:
88
# 1. Runs with read-only permissions (no write access to repo or secrets exposure)
9-
# 2. Only ollama provider runs automatically on pull_request (no secrets)
9+
# 2. Only ollama variants run automatically on pull_request (no secrets needed)
1010
# 3. API key providers (gpt, azure, bedrock) only run via manual workflow_dispatch
1111
# 4. Fork PRs with API key providers are blocked (prevents secret theft)
1212
# 5. Recordings uploaded as artifacts; companion workflow handles commits
@@ -120,13 +120,13 @@ jobs:
120120
fi
121121
122122
# Determine which providers to run
123-
# Security: For pull_request, only run ollama (no secrets)
123+
# Security: For pull_request, only run ollama variants (no secrets needed)
124124
# Manual workflow_dispatch uses input providers (defaults to API providers)
125125
if [ "$EVENT_NAME" = "workflow_dispatch" ]; then
126126
PROVIDERS="$INPUT_PROVIDERS"
127127
else
128128
# Auto-trigger on PR: only ollama (no secrets exposed to any PR)
129-
PROVIDERS="ollama"
129+
PROVIDERS="ollama,ollama-reasoning"
130130
fi
131131
132132
{
@@ -190,6 +190,12 @@ jobs:
190190
provider:
191191
- setup: ollama
192192
suite: base
193+
- setup: ollama-vision
194+
suite: vision
195+
- setup: ollama-reasoning
196+
suite: ollama-reasoning
197+
- setup: ollama
198+
suite: messages
193199
- setup: gpt
194200
suite: responses
195201
- setup: gpt
@@ -238,21 +244,26 @@ jobs:
238244
project_id: ${{ secrets.VERTEX_AI_PROJECT }}
239245
workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}
240246

241-
# Note: Using full repo path with pinned SHA ensures actions are loaded from
242-
# a trusted commit, not from PR checkout. This is critical for security.
243247
- name: Setup test environment
244248
if: steps.should_run.outputs.run == 'true'
245-
uses: ogx-ai/llama-stack/.github/actions/setup-test-environment@68c0994a790e4f029007f3cce12a744d69a7d435
249+
uses: ogx-ai/ogx/.github/actions/setup-test-environment@e1ba4f9f10fa45750f5b4f186a0c4ae59bc93e4d
246250
with:
247251
python-version: "3.12"
248252
client-version: "latest"
249253
setup: ${{ matrix.provider.setup }}
250254
suite: ${{ inputs.suite || matrix.provider.suite }}
251255
inference-mode: 'record-if-missing'
252256

257+
- name: Clear stale model list recordings
258+
if: steps.should_run.outputs.run == 'true' && matrix.provider.setup == 'ollama-reasoning'
259+
shell: bash
260+
run: |
261+
find tests/integration -path "*/recordings/models-*.json" -delete
262+
echo "Cleared model list recordings so record-if-missing creates fresh ones"
263+
253264
- name: Run and record tests
254265
if: steps.should_run.outputs.run == 'true'
255-
uses: ogx-ai/llama-stack/.github/actions/run-and-record-tests@68c0994a790e4f029007f3cce12a744d69a7d435
266+
uses: ogx-ai/ogx/.github/actions/run-and-record-tests@e1ba4f9f10fa45750f5b4f186a0c4ae59bc93e4d
256267
env:
257268
OPENAI_API_KEY: ${{ matrix.provider.setup == 'gpt' && secrets.OPENAI_API_KEY || '' }}
258269
AZURE_API_KEY: ${{ matrix.provider.setup == 'azure' && secrets.AZURE_API_KEY || '' }}
@@ -282,7 +293,7 @@ jobs:
282293
if: steps.should_run.outputs.run == 'true'
283294
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
284295
with:
285-
name: recordings-${{ matrix.provider.setup }}-${{ github.run_id }}-${{ github.run_attempt || '1' }}
296+
name: recordings-${{ matrix.provider.setup }}-${{ matrix.provider.suite }}-${{ github.run_id }}-${{ github.run_attempt || '1' }}
286297
path: |
287298
tests/integration/recordings/
288299
tests/integration/*/recordings/

0 commit comments

Comments
 (0)