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

feat(e2e): Canary FW CI pipelines for playwright tests #17606

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

HajekOndrej
Copy link
Contributor

Description

Added jobs to test with main firmware.

Related Issue

Resolve

Screenshots:

@HajekOndrej HajekOndrej requested a review from Vere-Grey March 12, 2025 12:47
@HajekOndrej HajekOndrej requested a review from vdovhanych as a code owner March 12, 2025 12:47
Copy link

coderabbitai bot commented Mar 12, 2025

Walkthrough

The changes introduce two new GitHub Actions workflow files and a minor update to a code file. One workflow file automates the desktop end-to-end (E2E) test suite by loading an E2E test matrix and executing tests on an Ubuntu environment, using scheduled and manual triggers. The second workflow file automates the Suite Web application E2E tests, executing a build step, loading the test matrix, and running tests via Playwright on a scheduled nightly basis as well as on manual invocation. Both workflows incorporate conditions based on the repository name and pass environment variables, including a canary firmware flag and test secrets, to the tests. Additionally, a logging statement has been added to the startEmu method in the Trezor User Environment Link module to output the parameters used when starting the emulator, without altering any existing public declarations.

✨ Finishing Touches
  • 📝 Generate Docstrings

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.
    • 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.
  • @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

@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 (2)
packages/trezor-user-env-link/src/api.ts (1)

205-205: Logging Statement Addition: Validate Sensitive Data Exposure
The new logging statement outputs the emulator startup parameters. Please verify that no sensitive information (such as secrets or personal data) is included in these parameters when logged. If this logging is for debugging in a controlled environment, it’s acceptable; otherwise, consider masking any sensitive values.

.github/workflows/test-suite-web-e2e-fw-canary.yml (1)

1-79: New Suite Web E2E Workflow: Well-Structured Setup
This new GitHub Actions workflow for running nightly and manually triggered Suite Web e2e tests is clear and well structured. The file correctly specifies triggers, permissions, environment variables, and the three-step job sequence (build, load matrix, run tests). Please ensure that the custom actions (e.g., build-web, load-e2e-matrix, run-e2e-tests) are covered by tests and documented to streamline troubleshooting in CI.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between e346ba7 and 0b8deb9.

📒 Files selected for processing (3)
  • .github/workflows/test-suite-desktop-e2e-fw-canary.yml (1 hunks)
  • .github/workflows/test-suite-web-e2e-fw-canary.yml (1 hunks)
  • packages/trezor-user-env-link/src/api.ts (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (12)
  • GitHub Check: run-e2e-suite-desktop-tests (@group=wallet, trezor-user-env-unix bitcoin-regtest)
  • GitHub Check: run-e2e-suite-desktop-tests (@group=other, trezor-user-env-unix)
  • GitHub Check: run-e2e-suite-desktop-tests (@group=passphrase, trezor-user-env-unix)
  • GitHub Check: run-e2e-suite-desktop-tests (@group=settings, trezor-user-env-unix bitcoin-regtest)
  • GitHub Check: run-e2e-suite-desktop-tests (@group=device-management, trezor-user-env-unix)
  • GitHub Check: run-e2e-suite-desktop-tests (@group=suite, trezor-user-env-unix)
  • GitHub Check: build-deploy
  • GitHub Check: build-deploy
  • GitHub Check: transport-e2e-test
  • GitHub Check: Setup and Cache Dependencies
  • GitHub Check: Analyze with CodeQL (javascript)
  • GitHub Check: build-web
🔇 Additional comments (1)
.github/workflows/test-suite-desktop-e2e-fw-canary.yml (1)

1-66: New Suite Desktop E2E Workflow: Clear and Consistent Configuration
This new workflow file for desktop E2E tests is well organized. It correctly defines the scheduling, conditional execution based on the repository, and the multi-step process including checkout, Node.js setup (with reference to the .nvmrc file), desktop app build, and running Playwright tests. Ensure that the Node.js version specified in your .nvmrc aligns with your project requirements and that the caching mechanism for Yarn dependencies is functioning as intended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant