Note: The tests require a running instance of the seed node.
Install yarn dependencies
yarn
Copy Env file
cp .env.example .env
- Specify
CONNECTION_TYPE=local
in the.env
file. - Run node locally
cargo run -- --dev --unsafe-rpc-external --rpc-port=9944 --rpc-cors=all
- Note: You need to run specific test files, since the suite will not handle startup and shutdown of local node (state is persisted across runs; manual node restarts required)
yarn hardhat test test/TestCall.GasEstimates.test.ts
- Add support for support
ConnectionType
ofbinary
in node.ts to handle startup and shutdown of local node - Multi-process startup and graceful shutdown (each test suite should spin up its own node and be able to be run in parallel - like the docker approach below)
The test suite will handle spinning up and down the local node (in docker) for it to test against.
docker build -t seed/pr -f Dockerfile .
yarn test
Integration tests are run against the latest seed node/image built by the Dockerfile upon pull requests
to the main
branch - in the Github actions CI pipeline.