Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Updating cypress command #39056

Merged
merged 5 commits into from
Feb 6, 2025
Merged

ci: Updating cypress command #39056

merged 5 commits into from
Feb 6, 2025

Conversation

sagar-qa007
Copy link
Contributor

@sagar-qa007 sagar-qa007 commented Feb 6, 2025

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

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/13177264800
Commit: c801ca9
Cypress dashboard.
Tags: @tag.All
Spec:


Thu, 06 Feb 2025 13:42:26 UTC

Communication

Should the DevRel and Marketing teams inform users about this change?

  • Yes
  • No

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.

@sagar-qa007 sagar-qa007 requested a review from sharat87 as a code owner February 6, 2025 06:58
@sagar-qa007 sagar-qa007 added the ok-to-test Required label for CI label Feb 6, 2025
Copy link
Contributor

coderabbitai bot commented Feb 6, 2025

Walkthrough

This pull request updates the GitHub Actions workflow for Cypress tests. It replaces the predefined cypress-io/github-action@v6 with a custom command using npx cypress-repeat-pro that supports retries (via -n 3), sets the NODE_ENV inline, and captures output in a summary file (cy-repeat-summary.txt). The rest of the workflow remains unchanged.

Changes

File(s) Change Summary
.github/workflows/ci-test-custom-script.yml, .github/workflows/ci-test-hosted.yml Replaced the cypress-io/github-action@v6 with a custom npx cypress-repeat-pro command including retry logic, inline environment variable setup, and summary file output.

Sequence Diagram(s)

sequenceDiagram
    participant WF as Workflow
    participant CMD as Custom Command
    participant CYP as Cypress Tests
    participant OUT as Output File

    WF->>CMD: Execute Cypress test step\n(npx cypress-repeat-pro -n 3 ...)
    CMD->>CYP: Run tests with specified specs & configuration
    CYP-->>CMD: Return test results
    CMD->>OUT: Write output to cy-repeat-summary.txt
    CMD->>WF: Print summary file contents
Loading

Possibly related PRs

  • test: Adding feature to run a spec file with count #35282: The changes in the main PR and the retrieved PR are related as both modify the Cypress testing execution process, specifically by replacing the previous action with a custom command that includes retry capabilities.
  • chore: Fix chrome version to 129 #38183: The changes in the main PR and the retrieved PR are related as both modify the Cypress test execution process by replacing the cypress-io/github-action@v6 with a custom command using npx cypress-repeat-pro, although they focus on different workflow files.
  • ci: snowflake envs for credentials #39065: The changes in the main PR and the retrieved PR are related as both modify the Cypress test execution process in the .github/workflows/ci-test-hosted.yml file, specifically altering how environment variables are set and how tests are executed.

Suggested reviewers

  • sharat87
  • ApekshaBhosale
  • yatinappsmith

Poem

In the realm of bits and byte,
A custom test dance takes flight.
npx commands whirl with retry might,
A summary sings at the end of night,
CodeRabbit Inc cheers a code-filled delight!

Tip

🌐 Web search-backed reviews and chat
  • We have enabled web search-based reviews and chat for all users. This feature allows CodeRabbit to access the latest documentation and information on the web.
  • You can disable this feature by setting web_search: false in the knowledge_base settings.
  • Please share any feedback in the Discord discussion.

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added skip-changelog Adding this label to a PR prevents it from being listed in the changelog CI labels Feb 6, 2025
Copy link
Collaborator

@NandanAnantharamu NandanAnantharamu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@sagar-qa007 sagar-qa007 added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels Feb 6, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
.github/workflows/ci-test-hosted.yml (1)

162-163: Remove trailing spaces and fix comment spelling.

Line 162 contains trailing spaces as flagged by YAMLlint, and the comment has a minor typo ("afterwords"). Please remove the trailing spaces and update the comment to read, for example:
# Delete the .git folder afterwards to utilize the environment values

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 162-162: trailing spaces

(trailing-spaces)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2f87adf and 749fbdd.

📒 Files selected for processing (1)
  • .github/workflows/ci-test-hosted.yml (2 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/ci-test-hosted.yml

[error] 162-162: trailing spaces

(trailing-spaces)

🔇 Additional comments (1)
.github/workflows/ci-test-hosted.yml (1)

250-256: Review of the updated Cypress run command.

The new step uses a custom command with npx cypress-repeat-pro run -n 3 --rerun-failed-only ... which enhances retry behavior for flaky tests. The inline setting NODE_ENV: development and the subsequent output of cy-repeat-summary.txt appear to be correctly configured. Please verify that the chosen environment (development) is intentional for hosted tests and that the summary file is generated as expected.

@sagar-qa007 sagar-qa007 added CI ok-to-test Required label for CI and removed CI ok-to-test Required label for CI labels Feb 6, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
.github/workflows/ci-test-hosted.yml (1)

162-162: Nitpick: Remove Trailing Spaces

There are trailing spaces at line 162. Please remove them to comply with YAML linting standards.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 162-162: trailing spaces

(trailing-spaces)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 749fbdd and c801ca9.

📒 Files selected for processing (2)
  • .github/workflows/ci-test-custom-script.yml (1 hunks)
  • .github/workflows/ci-test-hosted.yml (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/ci-test-custom-script.yml
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/ci-test-hosted.yml

[error] 162-162: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: perform-test / rts-build / build
  • GitHub Check: perform-test / server-build / server-unit-tests
🔇 Additional comments (1)
.github/workflows/ci-test-hosted.yml (1)

250-257: Verify NODE_ENV and Cypress Command Configuration

The workflow now sets NODE_ENV directly to "development" inline before running the Cypress command. Please confirm that using "development" is the intended configuration for the hosted test environment. Additionally, the custom command using npx cypress-repeat-pro run -n 3 --rerun-failed-only along with the summary output via cat cy-repeat-summary.txt is a solid improvement for handling flaky tests. Ensure that the summary file is reliably generated during each run.

Copy link
Collaborator

@NandanAnantharamu NandanAnantharamu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@sagar-qa007 sagar-qa007 enabled auto-merge (squash) February 6, 2025 12:22
@sagar-qa007 sagar-qa007 merged commit 8314a30 into release Feb 6, 2025
85 checks passed
@sagar-qa007 sagar-qa007 deleted the ci/addretryonrun branch February 6, 2025 13:42
@coderabbitai coderabbitai bot mentioned this pull request Feb 10, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI ok-to-test Required label for CI skip-changelog Adding this label to a PR prevents it from being listed in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants