filecoin-project / fevm-contract-tests

Integration tests for the Ethereum JSON-RPC API in Lotus
Other
1 stars 2 forks source link

Setup GitHub Actions CI against a Lotus devnet #1

Closed raulk closed 1 year ago

raulk commented 1 year ago

Goal

Run all the test cases defined here in an embedded Lotus devnet. For now, it's sufficient to:

  1. Set up a timer-based CI running every 4 hours.
  2. Against specific branches of Lotus configured in the CI config.

To set up the devnet, I would use the itests framework. We should be able to set up a go command that uses the itests framework to spin up an "embedded Lotus devnet" with an arbitrary block time.

Embedded Lotus devnet

  1. Create a Go program that sets up an itests ensemble, makes it run to infinity, and sets up an HTTP endpoint for control on a designated localhost port (e.g. 1111).
  2. The HTTP endpoint would have three commands:

CI job

  1. Spin up the go program in the background.
  2. Call ready and wait until it returns an HTTP 200 OK.
  3. Call urls to get the URLs to interact with the ensemble, so we can set up the tests.
  4. Run the tests.
  5. When the tests are done, call kill.

Considerations

ychiaoli18 commented 1 year ago

@raulk Instead of having a long-running lotus node, it's cleaner to have each integration test file launch its lotus node in the test setup and kill the node when the test ends. How do you think?