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

Added test result to GH Annotations #4036

Merged
merged 2 commits into from
Jan 29, 2025
Merged

Added test result to GH Annotations #4036

merged 2 commits into from
Jan 29, 2025

Conversation

yury-dubinin
Copy link
Contributor

@yury-dubinin yury-dubinin commented Jan 29, 2025

What is the purpose of the change:

  • Added test result to GH Annotations
  • Up Keplr to 12.177

Copy link

vercel bot commented Jan 29, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
osmosis-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 29, 2025 2:58pm
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
osmosis-frontend-datadog ⬜️ Ignored (Inspect) Visit Preview Jan 29, 2025 2:58pm
osmosis-frontend-dev ⬜️ Ignored (Inspect) Visit Preview Jan 29, 2025 2:58pm
osmosis-frontend-edgenet ⬜️ Ignored (Inspect) Jan 29, 2025 2:58pm
osmosis-testnet ⬜️ Ignored (Inspect) Visit Preview Jan 29, 2025 2:58pm

@yury-dubinin yury-dubinin self-assigned this Jan 29, 2025
Copy link
Contributor

coderabbitai bot commented Jan 29, 2025

Walkthrough

The pull request introduces modifications to several end-to-end test files in the packages/e2e/tests/ directory. Key changes include the addition of the @actions/core module for improved logging and error reporting. The previous method of logging test failures using process.env.GITHUB_STEP_SUMMARY has been replaced with core.notice(), enhancing the feedback mechanism for test outcomes. Additionally, new afterEach hooks have been implemented in some tests to log the status of each test, while various formatting updates have been applied for consistency.

Changes

File Change Summary
packages/e2e/tests/monitoring.limit.wallet.spec.ts - Added import for @actions/core
- Replaced process.env.GITHUB_STEP_SUMMARY with core.notice() in test.afterEach block
packages/e2e/tests/monitoring.market.wallet.spec.ts - Added import for @actions/core
- Replaced process.env.GITHUB_STEP_SUMMARY with core.notice() in test.afterEach block
packages/e2e/tests/monitoring.swap.wallet.spec.ts - Added import for @actions/core
- Added test.afterEach hook for logging test status
packages/e2e/tests/swap.osmo.wallet.spec.ts - Added import for @actions/core
- Added test.afterEach hook for logging test status
packages/e2e/tests/swap.usdc.wallet.spec.ts - Added import for @actions/core
- Reformatted import statements to use double quotes
- Added test.afterEach hook for logging test status
packages/e2e/unzip-extension.ts - Updated file path for ZIP archive in getPathToExtension method

Sequence Diagram

sequenceDiagram
    participant Test as Test Case
    participant Core as @actions/core
    participant Logger as Logging System

    Test->>Core: Encounter test failure
    Core->>Logger: Log notice using core.notice()
    Note over Core,Logger: Replaces direct environment variable assignment
Loading

Possibly related PRs

Suggested reviewers

  • DavideSegullo
  • JoseRFelix
✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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. (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.

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
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

🔭 Outside diff range comments (1)
packages/e2e/tests/swap.osmo.wallet.spec.ts (1)

Add documentation for the skipped OSMO to WBTC swap test

The test is explicitly skipped using test.skip() without explanation, while other WBTC-related tests in the codebase are active. Since WBTC functionality appears to work in other scenarios (pair selection, balance checking), it would be helpful to document the specific reason for skipping this swap test.

🔗 Analysis chain

Line range hint 57-67: Consider documenting why the WBTC test is skipped.

The test for OSMO to WBTC swap is skipped without explanation. Consider adding a comment explaining why it's skipped or create an issue to track its re-enablement.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if there's an existing issue about the skipped test
gh issue list --search "WBTC test skip"

Length of output: 130


Script:

#!/bin/bash
# Get the full content of the test file and surrounding context
cat packages/e2e/tests/swap.osmo.wallet.spec.ts

# Search for any WBTC-related comments or documentation
rg -i "wbtc" packages/e2e/tests/ -A 5 -B 5

Length of output: 6433

🧹 Nitpick comments (2)
packages/e2e/tests/swap.usdc.wallet.spec.ts (2)

1-7: Consider maintaining existing quote style.

While the functional changes are good, changing from single to double quotes seems unnecessary and might conflict with project conventions.

-import * as core from "@actions/core";
-import { type BrowserContext, chromium, expect, test } from "@playwright/test";
-import { TestConfig } from "../test-config";
-import { UnzipExtension } from "../unzip-extension";
-import { WalletPage } from "../pages/keplr-page";
-import { TradePage } from "../pages/trade-page";
+import * as core from '@actions/core'
+import { type BrowserContext, chromium, expect, test } from '@playwright/test'
+import { TestConfig } from '../test-config'
+import { UnzipExtension } from '../unzip-extension'
+import { WalletPage } from '../pages/keplr-page'
+import { TradePage } from '../pages/trade-page'

9-166: Consider maintaining consistent quote and semicolon style.

While the functional changes are good, the widespread style changes from single to double quotes and adding semicolons might make the diff harder to review and could conflict with project conventions.

Let me know if you'd like me to generate a diff to revert these style changes while keeping the functional changes.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 121115b and 045708b.

⛔ Files ignored due to path filters (1)
  • packages/e2e/keplr-extension-manifest-v3-v0.12.177.zip is excluded by !**/*.zip, !**/*.zip
📒 Files selected for processing (4)
  • packages/e2e/tests/monitoring.swap.wallet.spec.ts (2 hunks)
  • packages/e2e/tests/swap.osmo.wallet.spec.ts (2 hunks)
  • packages/e2e/tests/swap.usdc.wallet.spec.ts (1 hunks)
  • packages/e2e/unzip-extension.ts (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • packages/e2e/unzip-extension.ts
⏰ Context from checks skipped due to timeout of 90000ms (20)
  • GitHub Check: test (20.x, unit)
  • GitHub Check: test (20.x, proto-codecs)
  • GitHub Check: test (20.x, tx)
  • GitHub Check: test (20.x, bridge)
  • GitHub Check: test (20.x, bridge)
  • GitHub Check: test (20.x, math)
  • GitHub Check: test (20.x, math)
  • GitHub Check: test (20.x, pools)
  • GitHub Check: test (20.x, pools)
  • GitHub Check: test (20.x, stores)
  • GitHub Check: test (20.x, stores)
  • GitHub Check: test (20.x, server)
  • GitHub Check: test (20.x, server)
  • GitHub Check: test (20.x, utils)
  • GitHub Check: test (20.x, utils)
  • GitHub Check: test (20.x, web)
  • GitHub Check: wait-for-deployment
  • GitHub Check: test (20.x, web)
  • GitHub Check: lint-workspace
  • GitHub Check: Summary
🔇 Additional comments (5)
packages/e2e/tests/monitoring.swap.wallet.spec.ts (2)

1-1: LGTM! Import of @actions/core for GitHub Annotations.

The addition of @actions/core aligns with the PR objective to integrate test results with GitHub Annotations.


44-51: LGTM! Well-structured test status logging.

The afterEach hook effectively captures and reports test failures using GitHub Annotations. The implementation:

  • Logs test status to console for debugging
  • Reports failures through GitHub Annotations using core.notice()
packages/e2e/tests/swap.osmo.wallet.spec.ts (2)

1-1: LGTM! Consistent import of @actions/core.

The addition maintains consistency with other test files.


47-54: LGTM! Consistent test status logging implementation.

The afterEach hook matches the implementation in other test files, maintaining consistency across the test suite.

packages/e2e/tests/swap.usdc.wallet.spec.ts (1)

55-62: LGTM! Consistent test status logging implementation.

The afterEach hook maintains consistency with other test files in reporting test status to GitHub Annotations.

@yury-dubinin yury-dubinin merged commit 098199f into stage Jan 29, 2025
37 checks passed
@yury-dubinin yury-dubinin deleted the yury/add-gh-actions branch January 29, 2025 15:23
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.

2 participants