From 8ace8a36df041bb5525e71e9e838cc45ff59dbdc Mon Sep 17 00:00:00 2001 From: Saroj <43822041+sarojsarab@users.noreply.github.com> Date: Thu, 1 Jun 2023 04:33:33 +0530 Subject: [PATCH] ci: Fix to pick the correct spec when rerunning failed specs in ci-test (#23821) ## Description - Fix to pick the correct spec when rerunning failed specs in ci-test #### Type of change - ci-test.yml ## Testing > #### How Has This Been Tested? - Github actions --- .github/workflows/ci-test.yml | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index 8866dbd69e..58c8220345 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -98,10 +98,15 @@ jobs: # We are using environment variable instead of regular to support multiline - name: Get failed_spec if: steps.run_result.outputs.run_result == 'failedtest' + working-directory : app/client run: | - failed_spec_env=$(cat ~/combined_failed_spec_ci/combined_failed_spec_ci) echo "failed_spec_env<> $GITHUB_ENV - echo "$failed_spec_env" >> $GITHUB_ENV + while IFS= read -r line + do + 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 - if: steps.run_result.outputs.run_result != 'success' && steps.run_result.outputs.run_result != 'failedtest' @@ -129,16 +134,6 @@ jobs: run: | mkdir -p cicontainerlocal/stacks/configuration/ - #Download the oldstacks from appsmithorg/oldstacks repo - - name: Download the oldstack - uses: actions/checkout@v3 - with: - ref: main - repository: appsmithorg/ci-oldstack - token: ${{ secrets.APPSMITH_CI_TEST_PAT }} - submodules: 'recursive' - path: cicontainerlocal/oldstack - - name: Run Appsmith & TED docker image if: steps.run_result.outputs.run_result != 'success' working-directory: "."