-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
test: Adding feature to run a spec file with count #35282
Conversation
WalkthroughThe recent changes introduce a new GitHub Actions workflow for the Appsmith application, enhancing the continuous integration process by allowing for repeatable limited test runs. Additionally, a new Cypress dependency has been added to improve testing capabilities. Together, these updates aim to streamline testing, improve artifact management, and contribute to a more robust development lifecycle. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant GitHub Actions
participant Docker Hub
participant Testing Environment
participant Cypress
User->>GitHub Actions: Trigger CI Workflow
GitHub Actions->>Docker Hub: Setup Docker Services
GitHub Actions->>Testing Environment: Checkout Code
Testing Environment->>Testing Environment: Install Dependencies
Testing Environment->>Cypress: Run Tests
Cypress-->>Testing Environment: Return Test Results
Testing Environment-->>GitHub Actions: Save Artifacts
GitHub Actions-->>User: Communicate Status
Poem
TipsChatThere are 3 ways to chat with CodeRabbit:
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 as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this 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
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files ignored due to path filters (1)
app/client/yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
Files selected for processing (2)
- .github/workflows/ci-test-limited-with-count.yml (1 hunks)
- app/client/package.json (1 hunks)
Additional comments not posted (39)
app/client/package.json (1)
121-121
: Great job adding thecypress-repeat-updated
dependency!This addition will enhance the testing capabilities by allowing repeatable test runs. Ensure that this new dependency is compatible with the existing Cypress setup and verify if any additional configuration is needed.
.github/workflows/ci-test-limited-with-count.yml (38)
1-5
: Well-defined workflow name and triggers!The workflow name is clear, and the
workflow_dispatch
trigger allows for manual triggering, which is useful for testing purposes.
6-21
: Good job defining the inputs for the workflow!The inputs for PR number, previous workflow run ID, and run count are well-defined with appropriate descriptions and default values. This makes the workflow flexible and easy to use.
39-41
: Great job specifying the job and runner!The job
ci-test-limited
runs onubuntu-latest
, which is a good choice for a CI environment.
42-47
: Nice conditional logic for job execution!The
if
condition ensures that the job runs only under specific events, which helps in controlling the workflow execution.
48-50
: Good use of defaults for the shell!Specifying
bash
as the shell ensures consistency across steps.
52-64
: Well-configured service containers!The Redis and MongoDB services are correctly defined with appropriate Docker images and port mappings.
66-69
: Good job setting up the Depot CLI!Using the
depot/setup-action@v1
action ensures that the Depot CLI is correctly set up.
70-74
: Secure DockerHub login!Using secrets for DockerHub credentials ensures secure access.
76-81
: Correct handling of fork-based PRs!Checking out the merge commit for fork-based PRs ensures that the correct code is tested.
83-87
: Good handling of branch push events!Checking out the head commit of the branch ensures that the latest code is tested.
88-90
: Nice use of timestamps for cache keys!Using timestamps helps in creating unique cache keys.
92-102
: Efficient cache restoration!Restoring the previous run result from the cache can save time and resources.
103-113
: Smart handling of previous run results!Using the previous run result to determine whether to rerun tests is efficient.
115-130
: Good job retrieving specs to run!Reading the specs from a file and excluding commented lines ensures that only the relevant tests are run.
131-138
: Efficient artifact download!Downloading the Docker image artifact from the previous run can save time.
139-146
: Correct handling of current run artifacts!Downloading the Docker image artifact for the current run ensures that the correct image is used.
147-150
: Proper Docker image loading!Loading the Docker image from a tar file is a good practice.
152-157
: Good practice creating necessary folders!Creating required folders ensures that the environment is correctly set up.
158-202
: Comprehensive Docker setup!Running the necessary Docker containers with the required configurations ensures that the tests have the correct environment.
204-207
: Correct Node.js setup!Using
actions/setup-node@v4
to set up Node.js ensures that the correct version is used.
209-219
: Efficient Yarn cache restoration!Restoring the Yarn cache manually ensures that dependencies are installed quickly.
221-225
: Proper dependency installation!Installing dependencies with
yarn install --immutable
ensures that the correct versions are used.
227-234
: Good setup for Cypress tests!Setting up Cypress tests correctly ensures that the tests run smoothly.
235-240
: Correct Chrome setup!Using
browser-actions/setup-chrome@latest
ensures that the correct version of Chrome is used for the tests.
241-255
: Nice handling of Git values!Saving and displaying Git values helps in debugging and tracking the workflow.
266-280
: Dynamic commit message setting!Setting the commit message based on the event and inputs ensures clarity in logs.
282-352
: Comprehensive Cypress test execution!Running Cypress tests with the necessary environment variables and repeating the tests as specified ensures thorough testing.
353-357
: Efficient log file management!Trimming the number of Cypress log files helps in managing storage and keeping only the relevant logs.
358-365
: Good practice uploading Cypress logs!Uploading Cypress logs as artifacts ensures that they are available for debugging if needed.
366-373
: Proper snapshot handling!Uploading Cypress snapshots as artifacts ensures that visual test results are available for review.
374-380
: Thorough log collection!Collecting CI container logs helps in debugging and understanding the test environment.
381-389
: Good practice uploading server logs!Uploading server logs as artifacts ensures that they are available for debugging if needed.
390-395
: Efficient report management!Renaming and moving reports ensures that they are organized and easy to find.
396-403
: Proper report handling!Uploading Cypress reports as artifacts ensures that test results are available for review.
404-409
: Smart status handling!Setting the status to
failedtest
if there are test failures helps in tracking the workflow status.
410-418
: Efficient caching of run results!Storing the previous run result in the cache ensures that the workflow can efficiently handle retries.
419-426
: Good practice uploading server logs!Uploading server logs as artifacts ensures that they are available for debugging if needed.
428-432
: Correct handling of successful runs!Setting the status to
success
if the run is successful ensures that the workflow status is accurately tracked.
Description
It is for running a spec file with given run_count
Fixes #
34956
Automation
/ok-to-test tags=""
🔍 Cypress test results
Caution
If you modify the content in this section, you are likely to disrupt the CI result for your PR.
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit
New Features
Improvements