Skip to content

Commit 3b1a9fe

Browse files
authored
optimize hardware list for test (#1151)
Signed-off-by: chensuyue <[email protected]>
1 parent e66d7fe commit 3b1a9fe

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

.github/workflows/_get-test-matrix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
test_mode:
1515
required: false
1616
type: string
17-
default: 'docker_compose'
17+
default: 'compose'
1818
outputs:
1919
run_matrix:
2020
description: "The matrix string"

.github/workflows/push-image-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
job1:
1919
uses: ./.github/workflows/_get-test-matrix.yml
2020
with:
21-
test_mode: "docker_image_build/build.yaml"
21+
test_mode: "docker_image_build"
2222

2323
image-build:
2424
needs: job1

.github/workflows/scripts/get_test_matrix.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,13 @@ for example in ${examples}; do
1616
if [[ ! $(find . -type f | grep ${test_mode}) ]]; then continue; fi
1717
cd tests
1818
ls -l
19-
hardware_list=$(find . -type f -name "test_compose*_on_*.sh" | cut -d/ -f2 | cut -d. -f1 | awk -F'_on_' '{print $2}'| sort -u)
20-
echo "Test supported hardware list = ${hardware_list}"
19+
if [[ "$test_mode" == "docker_image_build" ]]; then
20+
find_name="test_manifest_on_*.sh"
21+
else
22+
find_name="test_${test_mode}*_on_*.sh"
23+
fi
24+
hardware_list=$(find . -type f -name "${find_name}" | cut -d/ -f2 | cut -d. -f1 | awk -F'_on_' '{print $2}'| sort -u)
25+
echo -e "Test supported hardware list: \n${hardware_list}"
2126

2227
run_hardware=""
2328
if [[ $(printf '%s\n' "${changed_files[@]}" | grep ${example} | cut -d'/' -f2 | grep -E '*.py|Dockerfile*|ui|docker_image_build' ) ]]; then

0 commit comments

Comments
 (0)