ci: Updating cypress command (#39056)

## Description
Hosted run also pass :
https://github.com/appsmithorg/appsmith/actions/runs/13174366287


Fixes #`Issue Number`  
_or_  
Fixes `Issue URL`
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

/ok-to-test tags="@tag.All"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!IMPORTANT]
> 🟣 🟣 🟣 Your tests are running.
> Tests running at:
<https://github.com/appsmithorg/appsmith/actions/runs/13177264800>
> Commit: c801ca9a498215552c3bf91bd6392d20d2f64b3c
> Workflow: `PR Automation test suite`
> Tags: `@tag.All`
> Spec: ``
> <hr>Thu, 06 Feb 2025 10:58:27 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Summary by CodeRabbit

- **Tests**
- Enhanced the test execution process by introducing a custom command
that supports multiple retries and detailed summary reporting.
- **Chores**
- Streamlined the continuous integration workflow with improved
environment variable management during test runs.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Sagar Khalasi 2025-02-06 19:12:32 +05:30 committed by GitHub
parent d5390cb31e
commit 8314a30e39
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 16 additions and 16 deletions

View File

@ -302,7 +302,6 @@ jobs:
fi
- name: Run the cypress test
uses: cypress-io/github-action@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_USERNAME: ${{ secrets.CYPRESS_USERNAME }}
@ -371,13 +370,14 @@ jobs:
CYPRESS_SNOWFLAKE_ACCOUNT_NAME: ${{ secrets.SNOWFLAKE_ACCOUNT_NAME }}
CYPRESS_SNOWFLAKE_USERNAME: ${{ secrets.SNOWFLAKE_USERNAME }}
CYPRESS_SNOWFLAKE_PASSWORD: ${{ secrets.SNOWFLAKE_PASSWORD }}
with:
browser: ${{ env.BROWSER_PATH }}
install: false
config-file: cypress_ci_custom.config.ts
spec: ${{ inputs.spec }}
working-directory: app/client
env: "NODE_ENV=development"
NODE_ENV: development
run: |
cd app/client
npx cypress-repeat-pro run -n 3 --rerun-failed-only \
--spec "${{ inputs.spec }}" \
--config-file "cypress_ci_custom.config.ts" \
--browser "${{ env.BROWSER_PATH }}"
cat cy-repeat-summary.txt
- name: Trim number of cypress log files
if: failure()

View File

@ -183,7 +183,6 @@ jobs:
fi
- name: Run the cypress test
uses: cypress-io/github-action@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_USERNAME: ${{ secrets.CYPRESS_USERNAME }}
@ -248,12 +247,13 @@ jobs:
CYPRESS_SNOWFLAKE_ACCOUNT_NAME: ${{ secrets.SNOWFLAKE_ACCOUNT_NAME }}
CYPRESS_SNOWFLAKE_USERNAME: ${{ secrets.SNOWFLAKE_USERNAME }}
CYPRESS_SNOWFLAKE_PASSWORD: ${{ secrets.SNOWFLAKE_PASSWORD }}
with:
browser: ${{ env.BROWSER_PATH }}
install: false
config-file: cypress_ci_hosted.config.ts
working-directory: app/client
env: "NODE_ENV=development"
NODE_ENV: development
run: |
cd app/client
npx cypress-repeat-pro run -n 3 --rerun-failed-only \
--config-file "cypress_ci_hosted.config.ts" \
--browser "${{ env.BROWSER_PATH }}"
cat cy-repeat-summary.txt
- name: Rename reports
if: failure()