Skip to content

Commit 60b9213

Browse files
committed
fix(ci): Only run test groups that contain filtered test
When test_filter is specified, only run test groups that contain a matching test. Previously all groups would run even with a filter.
1 parent 40c198c commit 60b9213

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/integration-tests.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,14 @@ jobs:
177177
- name: Check if group should run
178178
id: check
179179
run: |
180-
if [ "${{ inputs.test_group }}" = "all" ] || [ "${{ inputs.test_group }}" = "${{ matrix.group }}" ] || [ -n "${{ inputs.test_filter }}" ]; then
180+
# If test_filter is specified, only run if this group contains the filtered test
181+
if [ -n "${{ inputs.test_filter }}" ]; then
182+
if echo "${{ matrix.tests }}" | grep -q "${{ inputs.test_filter }}"; then
183+
echo "should_run=true" >> $GITHUB_OUTPUT
184+
else
185+
echo "should_run=false" >> $GITHUB_OUTPUT
186+
fi
187+
elif [ "${{ inputs.test_group }}" = "all" ] || [ "${{ inputs.test_group }}" = "${{ matrix.group }}" ]; then
181188
echo "should_run=true" >> $GITHUB_OUTPUT
182189
else
183190
echo "should_run=false" >> $GITHUB_OUTPUT
@@ -319,7 +326,7 @@ jobs:
319326
name: "Docker Tests"
320327
runs-on: ubuntu-latest
321328
timeout-minutes: 60
322-
if: ${{ inputs.test_group == 'all' || inputs.test_group == 'docker-tests' || inputs.test_group == '' }}
329+
if: ${{ (inputs.test_filter != '' && (contains(inputs.test_filter, 'rag-with-kotlin') || contains(inputs.test_filter, 'evaluation-recursive'))) || (inputs.test_filter == '' && (inputs.test_group == 'all' || inputs.test_group == 'docker-tests' || inputs.test_group == '')) }}
323330

324331
services:
325332
pgvector:

0 commit comments

Comments
 (0)