|
6 | 6 | # SECURITY NOTE: This workflow uses pull_request (not pull_request_target) for security. |
7 | 7 | # Security measures: |
8 | 8 | # 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) |
10 | 10 | # 3. API key providers (gpt, azure, bedrock) only run via manual workflow_dispatch |
11 | 11 | # 4. Fork PRs with API key providers are blocked (prevents secret theft) |
12 | 12 | # 5. Recordings uploaded as artifacts; companion workflow handles commits |
@@ -120,13 +120,13 @@ jobs: |
120 | 120 | fi |
121 | 121 |
|
122 | 122 | # 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) |
124 | 124 | # Manual workflow_dispatch uses input providers (defaults to API providers) |
125 | 125 | if [ "$EVENT_NAME" = "workflow_dispatch" ]; then |
126 | 126 | PROVIDERS="$INPUT_PROVIDERS" |
127 | 127 | else |
128 | 128 | # Auto-trigger on PR: only ollama (no secrets exposed to any PR) |
129 | | - PROVIDERS="ollama" |
| 129 | + PROVIDERS="ollama,ollama-reasoning" |
130 | 130 | fi |
131 | 131 |
|
132 | 132 | { |
@@ -190,6 +190,12 @@ jobs: |
190 | 190 | provider: |
191 | 191 | - setup: ollama |
192 | 192 | suite: base |
| 193 | + - setup: ollama-vision |
| 194 | + suite: vision |
| 195 | + - setup: ollama-reasoning |
| 196 | + suite: ollama-reasoning |
| 197 | + - setup: ollama |
| 198 | + suite: messages |
193 | 199 | - setup: gpt |
194 | 200 | suite: responses |
195 | 201 | - setup: gpt |
@@ -238,21 +244,26 @@ jobs: |
238 | 244 | project_id: ${{ secrets.VERTEX_AI_PROJECT }} |
239 | 245 | workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }} |
240 | 246 |
|
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. |
243 | 247 | - name: Setup test environment |
244 | 248 | 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 |
246 | 250 | with: |
247 | 251 | python-version: "3.12" |
248 | 252 | client-version: "latest" |
249 | 253 | setup: ${{ matrix.provider.setup }} |
250 | 254 | suite: ${{ inputs.suite || matrix.provider.suite }} |
251 | 255 | inference-mode: 'record-if-missing' |
252 | 256 |
|
| 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 | +
|
253 | 264 | - name: Run and record tests |
254 | 265 | 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 |
256 | 267 | env: |
257 | 268 | OPENAI_API_KEY: ${{ matrix.provider.setup == 'gpt' && secrets.OPENAI_API_KEY || '' }} |
258 | 269 | AZURE_API_KEY: ${{ matrix.provider.setup == 'azure' && secrets.AZURE_API_KEY || '' }} |
@@ -282,7 +293,7 @@ jobs: |
282 | 293 | if: steps.should_run.outputs.run == 'true' |
283 | 294 | uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
284 | 295 | 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' }} |
286 | 297 | path: | |
287 | 298 | tests/integration/recordings/ |
288 | 299 | tests/integration/*/recordings/ |
|
0 commit comments