Skip to content

Commit 6a4da14

Browse files
committed
ci: integrate vLLM inference tests with GitHub Actions workflows
Add vLLM provider support to integration test CI workflows alongside existing Ollama support. Configure provider-specific test execution where vLLM runs only inference specific tests (excluding vision tests) while Ollama continues to run the full test suite. This enables comprehensive CI testing of both inference providers but keeps the vLLM footprint small, this can be expanded later if it proves to not be too disruptive. Signed-off-by: Derek Higgins <[email protected]>
1 parent d7aaa6b commit 6a4da14

File tree

3 files changed

+46
-42
lines changed

3 files changed

+46
-42
lines changed

.github/actions/run-and-record-tests/action.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ runs:
5252
git add tests/integration/recordings/
5353
5454
if [ "${{ inputs.run-vision-tests }}" == "true" ]; then
55-
git commit -m "Recordings update from CI (vision)"
55+
git commit -m "Recordings update from CI (vision) (${{ inputs.provider }})"
5656
else
57-
git commit -m "Recordings update from CI"
57+
git commit -m "Recordings update from CI (${{ inputs.provider }})"
5858
fi
5959
6060
git fetch origin ${{ github.event.pull_request.head.ref }}
@@ -70,7 +70,8 @@ runs:
7070
if: ${{ always() }}
7171
shell: bash
7272
run: |
73-
sudo docker logs ollama > ollama-${{ inputs.inference-mode }}.log || true
73+
sudo docker logs ollama > ollama-${{ inputs.inference-mode }}.log 2>&1 || true
74+
sudo docker logs vllm > vllm-${{ inputs.inference-mode }}.log 2>&1 || true
7475
7576
- name: Upload logs
7677
if: ${{ always() }}

.github/workflows/integration-tests.yml

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ on:
2020
schedule:
2121
# If changing the cron schedule, update the provider in the test-matrix job
2222
- cron: '0 0 * * *' # (test latest client) Daily at 12 AM UTC
23-
- cron: '1 0 * * 0' # (test vllm) Weekly on Sunday at 1 AM UTC
2423
workflow_dispatch:
2524
inputs:
2625
test-all-client-versions:
@@ -38,28 +37,7 @@ concurrency:
3837
cancel-in-progress: true
3938

4039
jobs:
41-
discover-tests:
42-
runs-on: ubuntu-latest
43-
outputs:
44-
test-types: ${{ steps.generate-test-types.outputs.test-types }}
45-
46-
steps:
47-
- name: Checkout repository
48-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
49-
50-
- name: Generate test types
51-
id: generate-test-types
52-
run: |
53-
# Get test directories dynamically, excluding non-test directories
54-
# NOTE: we are excluding post_training since the tests take too long
55-
TEST_TYPES=$(find tests/integration -maxdepth 1 -mindepth 1 -type d |
56-
sed 's|tests/integration/||' |
57-
grep -Ev "^(__pycache__|fixtures|test_cases|recordings|non_ci|post_training)$" |
58-
sort | jq -R -s -c 'split("\n")[:-1]')
59-
echo "test-types=$TEST_TYPES" >> $GITHUB_OUTPUT
60-
6140
run-replay-mode-tests:
62-
needs: discover-tests
6341
runs-on: ubuntu-latest
6442
name: ${{ format('Integration Tests ({0}, {1}, {2}, client={3}, vision={4})', matrix.client-type, matrix.provider, matrix.python-version, matrix.client-version, matrix.run-vision-tests) }}
6543

@@ -68,11 +46,14 @@ jobs:
6846
matrix:
6947
client-type: [library, server]
7048
# Use vllm on weekly schedule, otherwise use test-provider input (defaults to ollama)
71-
provider: ${{ (github.event.schedule == '1 0 * * 0') && fromJSON('["vllm"]') || fromJSON(format('["{0}"]', github.event.inputs.test-provider || 'ollama')) }}
49+
provider: [ollama, vllm]
7250
# Use Python 3.13 only on nightly schedule (daily latest client test), otherwise use 3.12
7351
python-version: ${{ github.event.schedule == '0 0 * * *' && fromJSON('["3.12", "3.13"]') || fromJSON('["3.12"]') }}
7452
client-version: ${{ (github.event.schedule == '0 0 * * *' || github.event.inputs.test-all-client-versions == 'true') && fromJSON('["published", "latest"]') || fromJSON('["latest"]') }}
7553
run-vision-tests: [true, false]
54+
exclude:
55+
- provider: vllm
56+
run-vision-tests: true
7657

7758
steps:
7859
- name: Checkout repository
@@ -87,10 +68,27 @@ jobs:
8768
run-vision-tests: ${{ matrix.run-vision-tests }}
8869
inference-mode: 'replay'
8970

71+
- name: Generate test types
72+
id: generate-test-types
73+
run: |
74+
# Only run inference tests for vllm as these are more likely to exercise the vllm provider
75+
# TODO: Add agent tests for vllm
76+
if [ ${{ matrix.provider }} == "vllm" ]; then
77+
echo "test-types=[\"inference\"]" >> $GITHUB_OUTPUT
78+
exit 0
79+
fi
80+
# Get test directories dynamically, excluding non-test directories
81+
# NOTE: we are excluding post_training since the tests take too long
82+
TEST_TYPES=$(find tests/integration -maxdepth 1 -mindepth 1 -type d |
83+
sed 's|tests/integration/||' |
84+
grep -Ev "^(__pycache__|fixtures|test_cases|recordings|non_ci|post_training)$" |
85+
sort | jq -R -s -c 'split("\n")[:-1]')
86+
echo "test-types=$TEST_TYPES" >> $GITHUB_OUTPUT
87+
9088
- name: Run tests
9189
uses: ./.github/actions/run-and-record-tests
9290
with:
93-
test-types: ${{ needs.discover-tests.outputs.test-types }}
91+
test-types: ${{ steps.generate-test-types.outputs.test-types }}
9492
stack-config: ${{ matrix.client-type == 'library' && 'ci-tests' || 'server:ci-tests' }}
9593
provider: ${{ matrix.provider }}
9694
inference-mode: 'replay'

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

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,6 @@ on:
1515
- '.github/actions/setup-ollama/action.yml'
1616
- '.github/actions/setup-test-environment/action.yml'
1717
- '.github/actions/run-and-record-tests/action.yml'
18-
workflow_dispatch:
19-
inputs:
20-
test-provider:
21-
description: 'Test against a specific provider'
22-
type: string
23-
default: 'ollama'
2418

2519
concurrency:
2620
group: ${{ github.workflow }}-${{ github.ref }}
@@ -42,12 +36,6 @@ jobs:
4236
- name: Generate test types
4337
id: generate-test-types
4438
run: |
45-
# Get test directories dynamically, excluding non-test directories
46-
TEST_TYPES=$(find tests/integration -maxdepth 1 -mindepth 1 -type d -printf "%f\n" |
47-
grep -Ev "^(__pycache__|fixtures|test_cases|recordings|post_training)$" |
48-
sort | jq -R -s -c 'split("\n")[:-1]')
49-
echo "test-types=$TEST_TYPES" >> $GITHUB_OUTPUT
50-
5139
labels=$(gh pr view ${{ github.event.pull_request.number }} --json labels --jq '.labels[].name')
5240
echo "labels=$labels"
5341
@@ -82,6 +70,10 @@ jobs:
8270
fail-fast: false
8371
matrix:
8472
mode: ${{ fromJSON(needs.discover-tests.outputs.matrix-modes) }}
73+
provider: [ollama, vllm]
74+
exclude:
75+
- mode: vision
76+
provider: vllm
8577

8678
steps:
8779
- name: Checkout repository
@@ -90,20 +82,33 @@ jobs:
9082
ref: ${{ github.event.pull_request.head.ref }}
9183
fetch-depth: 0
9284

85+
- name: Generate test types
86+
id: generate-test-types
87+
run: |
88+
if [ ${{ matrix.provider }} == "vllm" ]; then
89+
echo "test-types=[\"inference\"]" >> $GITHUB_OUTPUT
90+
else
91+
# Get test directories dynamically, excluding non-test directories
92+
TEST_TYPES=$(find tests/integration -maxdepth 1 -mindepth 1 -type d -printf "%f\n" |
93+
grep -Ev "^(__pycache__|fixtures|test_cases|recordings|non_ci|post_training)$" |
94+
sort | jq -R -s -c 'split("\n")[:-1]')
95+
echo "test-types=$TEST_TYPES" >> $GITHUB_OUTPUT
96+
fi
97+
9398
- name: Setup test environment
9499
uses: ./.github/actions/setup-test-environment
95100
with:
96101
python-version: "3.12" # Use single Python version for recording
97102
client-version: "latest"
98-
provider: ${{ inputs.test-provider || 'ollama' }}
103+
provider: ${{ matrix.provider }}
99104
run-vision-tests: ${{ matrix.mode == 'vision' && 'true' || 'false' }}
100105
inference-mode: 'record'
101106

102107
- name: Run and record tests
103108
uses: ./.github/actions/run-and-record-tests
104109
with:
105-
test-types: ${{ needs.discover-tests.outputs.test-types }}
110+
test-types: ${{ steps.generate-test-types.outputs.test-types }}
106111
stack-config: 'server:ci-tests' # recording must be done with server since more tests are run
107-
provider: ${{ inputs.test-provider || 'ollama' }}
112+
provider: ${{ matrix.provider }}
108113
inference-mode: 'record'
109114
run-vision-tests: ${{ matrix.mode == 'vision' && 'true' || 'false' }}

0 commit comments

Comments
 (0)