From 188976376afd392b252048024661dff1ec27e62c Mon Sep 17 00:00:00 2001 From: Saroj <43822041+sarojsarab@users.noreply.github.com> Date: Fri, 7 Jul 2023 14:57:29 +0530 Subject: [PATCH] ci: Fix to skip the commented lines from limited-tests.txt (#25197) ## Description - Fix to skip the commented lines from limited-tests.txt #### Type of change - Workflow file chnage ## Testing > #### How Has This Been Tested? - Manual workflow run --- .github/workflows/ci-test-limited.yml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci-test-limited.yml b/.github/workflows/ci-test-limited.yml index c861adb09d..5f28cdb153 100644 --- a/.github/workflows/ci-test-limited.yml +++ b/.github/workflows/ci-test-limited.yml @@ -110,13 +110,9 @@ jobs: echo "failed_spec_env<> $GITHUB_ENV while IFS= read -r line do - if [[ $line =~ ^#|^\/\/ ]]; then - continue - else - spec_name=$(echo $line | awk -F'/' '{print $NF}') - failed_spec_env=$(find . -name $spec_name | sed 's|./||') - echo "$failed_spec_env" >> $GITHUB_ENV - fi + spec_name=$(echo $line | awk -F'/' '{print $NF}') + failed_spec_env=$(find . -name $spec_name | sed 's|./||') + echo "$failed_spec_env" >> $GITHUB_ENV done < ~/combined_failed_spec_ci/combined_failed_spec_ci echo "EOF" >> $GITHUB_ENV @@ -124,9 +120,15 @@ jobs: - name: Get specs to run if: steps.run_result.outputs.run_result != 'success' run: | - specs_to_run=$(cat app/client/cypress/limited-tests.txt) echo "specs_to_run<> $GITHUB_ENV - echo "$specs_to_run" >> $GITHUB_ENV + while IFS= read -r line + do + if [[ $line =~ ^#|^\/\/ ]]; then + continue + else + echo "$line" >> $GITHUB_ENV + fi + done < app/client/cypress/limited-tests.txt echo "EOF" >> $GITHUB_ENV # In case of run-id provided download the artifact from the previous run