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
This commit is contained in:
Saroj 2023-06-01 04:33:33 +05:30 committed by GitHub
parent 2e22b8e309
commit 8ace8a36df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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<<EOF" >> $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: "."