lnd icon indicating copy to clipboard operation
lnd copied to clipboard

Add test coverage for integration tests

Open guggero opened this issue 1 year ago • 5 comments

Fixes https://github.com/lightningnetwork/lnd/issues/7363.

Adds integration test coverage tracking instrumentation. Since Golang v1.20.x allows writing coverage data even for processes that are started as their own sub process (which we do with lnd during the integration tests), we can now better assess the actual test coverage of our code as a combination of unit and integration tests.

guggero avatar Jan 26 '23 10:01 guggero

It looks like Golang 1.20.0rc3 cannot be downloaded using actions/setup-go@v3 just yet. But you can test this manually if you want with make itest cover=true and make itest temptest=true cover=true (and installing Go 1.20.0rc3 of course).

guggero avatar Jan 26 '23 11:01 guggero

[!IMPORTANT]

Auto Review Skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration 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.

coderabbitai[bot] avatar Mar 21 '24 14:03 coderabbitai[bot]

Cool, this seems to work! And now we have the actual coverage report available again: https://coveralls.io/builds/66441138 (also check out the report in the list of checks!).

Looks like because we forgot to add the parallel-finished: true parameter of the shogo82148/actions-goveralls@v1 action, we didn't complete our coverage reports before.

guggero avatar Mar 21 '24 16:03 guggero

@bitromortac I addressed your suggestion. Now you can see what job the result belongs to, for example: https://coveralls.io/builds/66504443 Not sure if there's also a way to see the combined coverage (which IMO should be higher than any of the individual coverage numbers).

guggero avatar Mar 25 '24 16:03 guggero

@guggero, remember to re-request review from reviewers when ready

lightninglabs-deploy avatar May 07 '24 18:05 lightninglabs-deploy

@saubyk since this is just testing related, can we get this PR in during the RC phase?

guggero avatar May 07 '24 18:05 guggero