Skip to content

Commit 3ba724c

Browse files
authored
Expand test matrix, find all tests use 3rd party Dockerfiles (opea-project#1676)
* Expand test matrix, find all tests use 3rd party Dockerfiles Signed-off-by: chensuyue <[email protected]>
1 parent 84eb850 commit 3ba724c

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/scripts/get_test_matrix.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,20 @@ function find_test_1() {
6060
fi
6161
fi
6262
elif [[ $(echo ${service_path} | grep "third_parties") ]]; then
63-
# new org with `src` and `third_parties` folder
63+
# new org with `src` and `third_parties` folder
6464
service_name=$(echo $service_path | sed 's:/src::' | tr '/' '_' | cut -c7-) # comps/third_parties/vllm/src -> third_parties_vllm
6565
find_test=$(find ./tests -type f -name test_${service_name}*.sh) || true
6666
if [ "$find_test" ]; then
6767
fill_in_matrix "$find_test"
6868
fi
69+
# find other tests use 3rd party Dockerfiles
70+
dockerfile_list=$(ls ${service_path}/Dockerfile*) || true
71+
for dockerfile_path in ${dockerfile_list}; do
72+
find_test=$(grep -rl ${dockerfile_path} ./tests) || true
73+
if [ "$find_test" ]; then
74+
fill_in_matrix "$find_test"
75+
fi
76+
done
6977
else
7078
# old org without 'src' folder
7179
service_name=$(echo $service_path | tr '/' '_' | cut -c7-) # comps/retrievers/redis/langchain -> retrievers_redis_langchain
@@ -174,6 +182,7 @@ function main() {
174182
echo "run_matrix=${run_matrix}"
175183
echo "run_matrix=${run_matrix}" >> $GITHUB_OUTPUT
176184

185+
is_empty="true"
177186
if [[ $(echo "$run_matrix" | grep -c "service") != 0 ]]; then
178187
is_empty="false"
179188
fi

0 commit comments

Comments
 (0)