Skip to content

E2E Test Automation Enhancements #66

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

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

E2E Test Automation Enhancements #66

wants to merge 11 commits into from

Conversation

chetanbothra
Copy link

@chetanbothra chetanbothra commented May 28, 2025

This PR introduces automated E2E test workflows to improve testing consistency and catch issues early across different environments.

Workflow Summary:

Nightly Runs: npm run test-mainnet-viem-combined runs every night automatically.

On Commit to master: test-mainnet-viem-combined.

On Commit to develop: npm run test-testnet-viem-combined.

Note: We currently do not have a develop branch

Alerts: All test alerts are sent to the #e2e channel on Slack for immediate visibility.

Summary by CodeRabbit

  • Chores
    • Improved automated test workflows for better flexibility and clearer separation based on branch and parameters.
    • Enhanced end-to-end test execution to support different commands for mainnet and testnet environments.
    • Updated publishing workflow to depend specifically on mainnet test results.

Copy link

linear bot commented May 28, 2025

Copy link

coderabbitai bot commented May 28, 2025

Walkthrough

The CircleCI configuration was updated to introduce a dynamic test_command pipeline parameter and refactor the E2E testing workflows. The e2e-tests job now accepts this parameter, enabling branch-specific test commands. Workflows were split for conditional execution, and job dependencies were adjusted for clearer separation between testnet and mainnet E2E tests.

Changes

File(s) Change Summary
.circleci/config.yml Added test_command parameter, refactored e2e-tests job to use it, split E2E workflows by branch and command, updated job dependencies and workflow conditions.

Sequence Diagram(s)

sequenceDiagram
    participant Pipeline
    participant E2E-Tests
    participant Testnet-E2E-Tests
    participant Mainnet-E2E-Tests
    participant Publish-NPM

    alt run_e2e_tests is true
        Pipeline->>E2E-Tests: Run with test_command = "npm run test-mainnet-viem-combined"
    else run_e2e_tests is false
        alt branch = develop
            Pipeline->>Testnet-E2E-Tests: Run with test_command = "npm run test-testnet-viem-combined"
        else branch = master
            Pipeline->>Mainnet-E2E-Tests: Run with test_command = "npm run test-mainnet-viem-combined"
            Mainnet-E2E-Tests->>Publish-NPM: On success, trigger publish
        end
    end
Loading

Poem

The pipeline hops with nimble flair,
Branches split with thoughtful care.
Mainnet, testnet—commands anew,
Each E2E test hops right through.
Workflows clear as morning dew—
CircleCI, we thank you!
🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 875dbd4 and b79dcad.

📒 Files selected for processing (1)
  • .circleci/config.yml (4 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .circleci/config.yml

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @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.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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.

Copy link

Yooo! You forgot to bump the version in package.json!

@chetanbothra chetanbothra requested review from ch4r10t33r and boonet May 28, 2025 16:09
Copy link

@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: 2

🧹 Nitpick comments (1)
.circleci/config.yml (1)

271-271: Remove extraneous blank line
There’s an extra blank line at the end of the file, triggering a YAML lint warning. Removing it will satisfy the empty-lines rule.

🧰 Tools
🪛 YAMLlint (1.37.1)

[warning] 271-271: too many blank lines

(1 > 0) (empty-lines)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a18a627 and 875dbd4.

📒 Files selected for processing (1)
  • .circleci/config.yml (4 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.circleci/config.yml

[warning] 271-271: too many blank lines

(1 > 0) (empty-lines)

🔇 Additional comments (7)
.circleci/config.yml (7)

50-54: Job-level test_command parameter looks good
The e2e-tests job now cleanly accepts a test_command parameter (lines 50–54), enabling workflows to override the test command dynamically.


104-104: Verify parameter substitution within a multiline script
You’ve injected << parameters.test_command >> inside a bash command: | block. Please confirm that CircleCI expands parameters inside literal blocks as intended so the correct test command runs.


233-235: install-and-publish conditional is correct
Using when: not << pipeline.parameters.run_e2e_tests >> properly gates this workflow when E2E tests aren’t explicitly requested.


240-246: Validate branch filter for testnet E2E tests
The testnet-e2e-tests job is filtered to the develop branch (lines 240–246), but a develop branch doesn’t currently exist. Please confirm or update this filter to match your branch strategy.


247-254: Confirm default branch for mainnet E2E tests
The mainnet-e2e-tests job filters on master (lines 247–254). If your default branch is named main, this job won’t trigger—please verify and adjust accordingly.


258-262: Align publish-npm-package branch filter with default branch
Publishing is gated to master (lines 258–262). Ensure this matches your repository’s primary branch to avoid missing npm releases.


270-271: Check GitHub release workflow branch filter
The publish-github-release job is also restricted to master (lines 270–271); verify that this aligns with your actual default branch for consistent release automation.

🧰 Tools
🪛 YAMLlint (1.37.1)

[warning] 271-271: too many blank lines

(1 > 0) (empty-lines)

Comment on lines +6 to +8
test_command:
type: string
default: "npm run test-testnet-viem-combined"
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Remove or utilize unused top-level test_command pipeline parameter
The pipeline-level parameter test_command is declared (lines 6–8) but never actually consumed by any workflow. Either remove these lines to avoid redundancy or leverage the pipeline parameter in your workflows (for example, by passing test_command: << pipeline.parameters.test_command >> to the e2e-tests job) to DRY up the configuration.

🤖 Prompt for AI Agents
In .circleci/config.yml around lines 6 to 8, the pipeline parameter
`test_command` is declared but not used anywhere in the workflows. To fix this,
either remove the `test_command` parameter declaration entirely to avoid
redundancy, or update the relevant workflows and jobs (such as the `e2e-tests`
job) to consume this parameter by passing `test_command: <<
pipeline.parameters.test_command >>` so the configuration is more maintainable
and DRY.

Copy link

Yooo! You forgot to bump the version in package.json!

@chetanbothra chetanbothra requested a review from kanthgithub May 29, 2025 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants