optimize hardware list for test (#1151)
Signed-off-by: chensuyue <suyue.chen@intel.com>
This commit is contained in:
2
.github/workflows/_get-test-matrix.yml
vendored
2
.github/workflows/_get-test-matrix.yml
vendored
@@ -14,7 +14,7 @@ on:
|
||||
test_mode:
|
||||
required: false
|
||||
type: string
|
||||
default: 'docker_compose'
|
||||
default: 'compose'
|
||||
outputs:
|
||||
run_matrix:
|
||||
description: "The matrix string"
|
||||
|
||||
2
.github/workflows/push-image-build.yml
vendored
2
.github/workflows/push-image-build.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
||||
job1:
|
||||
uses: ./.github/workflows/_get-test-matrix.yml
|
||||
with:
|
||||
test_mode: "docker_image_build/build.yaml"
|
||||
test_mode: "docker_image_build"
|
||||
|
||||
image-build:
|
||||
needs: job1
|
||||
|
||||
9
.github/workflows/scripts/get_test_matrix.sh
vendored
9
.github/workflows/scripts/get_test_matrix.sh
vendored
@@ -16,8 +16,13 @@ for example in ${examples}; do
|
||||
if [[ ! $(find . -type f | grep ${test_mode}) ]]; then continue; fi
|
||||
cd tests
|
||||
ls -l
|
||||
hardware_list=$(find . -type f -name "test_compose*_on_*.sh" | cut -d/ -f2 | cut -d. -f1 | awk -F'_on_' '{print $2}'| sort -u)
|
||||
echo "Test supported hardware list = ${hardware_list}"
|
||||
if [[ "$test_mode" == "docker_image_build" ]]; then
|
||||
find_name="test_manifest_on_*.sh"
|
||||
else
|
||||
find_name="test_${test_mode}*_on_*.sh"
|
||||
fi
|
||||
hardware_list=$(find . -type f -name "${find_name}" | cut -d/ -f2 | cut -d. -f1 | awk -F'_on_' '{print $2}'| sort -u)
|
||||
echo -e "Test supported hardware list: \n${hardware_list}"
|
||||
|
||||
run_hardware=""
|
||||
if [[ $(printf '%s\n' "${changed_files[@]}" | grep ${example} | cut -d'/' -f2 | grep -E '*.py|Dockerfile*|ui|docker_image_build' ) ]]; then
|
||||
|
||||
Reference in New Issue
Block a user