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

Add integration test to action and run regularly #308

Closed
ping-ke opened this issue Jul 15, 2024 · 0 comments
Closed

Add integration test to action and run regularly #308

ping-ke opened this issue Jul 15, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request high priority

Comments

@ping-ke
Copy link
Collaborator

ping-ke commented Jul 15, 2024

Rationale

We need an integration test to check if the latest code can run successfully, and we can set it up as an action to run regularly. We need the test to cover the following:

  1. Contract can be deployed to l2 successfully
  2. es-node bootnode can be run successfully
  3. blobs can be uploaded and downloaded to es-node
  4. es-node can be run correctly
  5. es-node can update its state regularly
  6. es-node can sync finish within the expected time
  7. es-node can mined

Implementation

To run the integration test, it is better to run on a self-host machine as it needs to run for a long time with a larger storage size which will incur larger charges.

why self-host machine

https://github.com/pricing/calculator?feature=actions#actions
https://docs.github.com/zh/billing/managing-billing-for-github-actions/about-billing-for-github-actions#per-minute-rates

How to add self-host machine

https://docs.github.com/zh/actions/hosting-your-own-runners/managing-self-hosted-runners/adding-self-hosted-runners

Code change

  1. Create a new run-integration-test.sh
  2. Create an Integration test service that has the same RPC handlers function and receives es-node state and check states
	http.HandleFunc("/hello", HelloHandler)
	http.HandleFunc("/reportstate", ReportStateHandler)
  1. Add action integration-test.yml

Check Points

  1. Contract can be deployed successfully
  2. bootnode can be run
  3. Blobs can be uploaded and downloaded to es-node successfully
  4. Receive the Hello request within 10 minutes; otherwise, the es-node may be down.
  5. Get states updated every 5 minutes; otherwise, the es-node may be down
  6. Sync percentage should increase every state update before it reaches 100%;
  7. Get mine state after sync is done;
  8. Mined at least one block within 2 hours.

Note: we can also run full node as an integration test every week or month

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request high priority
Projects
None yet
Development

No branches or pull requests

2 participants