Skip to content

Commit ace97da

Browse files
committed
ntsh
Signed-off-by: Derek Higgins <[email protected]>
1 parent 9614828 commit ace97da

File tree

2 files changed

+26
-28
lines changed

2 files changed

+26
-28
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,16 @@ 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 }}
6161
git rebase origin/${{ github.event.pull_request.head.ref }}
6262
echo "Rebased successfully"
6363
git push origin HEAD:${{ github.event.pull_request.head.ref }}
64-
echo "Pushed successfully"
64+
echo "Pushed successfully "
6565
else
6666
echo "No recording changes"
6767
fi
@@ -70,8 +70,8 @@ runs:
7070
if: ${{ always() }}
7171
shell: bash
7272
run: |
73-
sudo docker logs ollama > ollama-${{ inputs.inference-mode }}.log || true
74-
sudo docker logs vllm > vllm-${{ 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
7575
7676
- name: Upload logs
7777
if: ${{ always() }}

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

Lines changed: 21 additions & 23 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 }}
@@ -31,9 +25,6 @@ jobs:
3125
if: contains(github.event.pull_request.labels.*.name, 're-record-tests') ||
3226
contains(github.event.pull_request.labels.*.name, 're-record-vision-tests')
3327
runs-on: ubuntu-latest
34-
strategy:
35-
matrix:
36-
provider: [ollama, vllm]
3728
outputs:
3829
test-types: ${{ steps.generate-test-types.outputs.test-types }}
3930
matrix-modes: ${{ steps.generate-test-types.outputs.matrix-modes }}
@@ -45,21 +36,11 @@ jobs:
4536
- name: Generate test types
4637
id: generate-test-types
4738
run: |
48-
if [ ${{ matrix.provider }} == "vllm" ]; then
49-
echo "test-types=[\"inference\"]" >> $GITHUB_OUTPUT
50-
elif
51-
# Get test directories dynamically, excluding non-test directories
52-
TEST_TYPES=$(find tests/integration -maxdepth 1 -mindepth 1 -type d -printf "%f\n" |
53-
grep -Ev "^(__pycache__|fixtures|test_cases|recordings|post_training)$" |
54-
sort | jq -R -s -c 'split("\n")[:-1]')
55-
echo "test-types=$TEST_TYPES" >> $GITHUB_OUTPUT
56-
fi
57-
5839
labels=$(gh pr view ${{ github.event.pull_request.number }} --json labels --jq '.labels[].name')
5940
echo "labels=$labels"
6041
6142
modes_array=()
62-
if [[ $labels == *"re-record-vision-tests"* ]] && [[ ${{ matrix.provider }} == "ollama" ]]; then
43+
if [[ $labels == *"re-record-vision-tests"* ]]; then
6344
modes_array+=("vision")
6445
fi
6546
if [[ $labels == *"re-record-tests"* ]]; then
@@ -89,6 +70,10 @@ jobs:
8970
fail-fast: false
9071
matrix:
9172
mode: ${{ fromJSON(needs.discover-tests.outputs.matrix-modes) }}
73+
provider: [ollama, vllm]
74+
exclude:
75+
- mode: vision
76+
provider: vllm
9277

9378
steps:
9479
- name: Checkout repository
@@ -97,20 +82,33 @@ jobs:
9782
ref: ${{ github.event.pull_request.head.ref }}
9883
fetch-depth: 0
9984

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|post_training)$" |
94+
sort | jq -R -s -c 'split("\n")[:-1]')
95+
echo "test-types=$TEST_TYPES" >> $GITHUB_OUTPUT
96+
fi
97+
10098
- name: Setup test environment
10199
uses: ./.github/actions/setup-test-environment
102100
with:
103101
python-version: "3.12" # Use single Python version for recording
104102
client-version: "latest"
105-
provider: ${{ inputs.test-provider || 'ollama' }}
103+
provider: ${{ matrix.provider }}
106104
run-vision-tests: ${{ matrix.mode == 'vision' && 'true' || 'false' }}
107105
inference-mode: 'record'
108106

109107
- name: Run and record tests
110108
uses: ./.github/actions/run-and-record-tests
111109
with:
112-
test-types: ${{ needs.discover-tests.outputs.test-types }}
110+
test-types: ${{ steps.generate-test-types.outputs.test-types }}
113111
stack-config: 'server:ci-tests' # recording must be done with server since more tests are run
114-
provider: ${{ inputs.test-provider || 'ollama' }}
112+
provider: ${{ matrix.provider }}
115113
inference-mode: 'record'
116114
run-vision-tests: ${{ matrix.mode == 'vision' && 'true' || 'false' }}

0 commit comments

Comments
 (0)