From 33f37cebd4bba515b21203f94af2616faade2baa Mon Sep 17 00:00:00 2001 From: "chen, suyue" Date: Thu, 27 Jun 2024 21:35:12 +0800 Subject: [PATCH] fix duplicate ci test (#256) * fix duplicate test Signed-off-by: chensuyue * for test only Signed-off-by: chensuyue * Revert "for test only" This reverts commit a7718aa6e615c6bc472c2f287735c305c6f7a475. --------- Signed-off-by: chensuyue --- .github/workflows/reuse-get-test-matrix.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reuse-get-test-matrix.yml b/.github/workflows/reuse-get-test-matrix.yml index f631df8b4..76f5aaf63 100644 --- a/.github/workflows/reuse-get-test-matrix.yml +++ b/.github/workflows/reuse-get-test-matrix.yml @@ -83,12 +83,12 @@ jobs: # add test for test scripts update changed_files="$(git diff --name-only ${base_commit} ${merged_commit} | \ grep 'tests/' | grep -vE '*.md|*.txt|tests/cores')" || true + run_matrix_match=$(echo $run_matrix | tr '/' '_') test_files=$(printf '%s\n' "${changed_files[@]}" | grep -E "tests/test_*" | grep -E "*.sh") || true for test_file in ${test_files}; do - service_script=$(echo $test_file | cut -d'/' -f2 | cut -d'.' -f1 | cut -c6-) - service=$(echo $service_script | tr '_' '/') + service=$(echo $test_file | cut -d'/' -f2 | cut -d'.' -f1 | cut -c6-) hardware="gaudi" # default hardware, set based on the changed files - if [ $(echo ${run_matrix} | grep -c ${service}) == 0 ]; then + if [ $(echo ${run_matrix_match} | grep -c ${service}) == 0 ]; then run_matrix="${run_matrix}{\"service\":\"${service}\",\"hardware\":\"${hardware}\"}," fi done