entropyxyz / sdk

Official JavaScript SDK for Entropy blockchain.
GNU Affero General Public License v3.0
7 stars 0 forks source link

Provide an environment variable to direct tests to load binaries from. #213

Closed vitropy closed 10 months ago

vitropy commented 10 months ago

This commit adds an environment variable, ENTROPY_BINARY_DIR, that allows overwriting the location from which the test suite will look for the entropy and server binaries. I want this so that I can easily test different binary builds. This also makes it easier to use the same tests in CI and other environments, such as for example building locally on a macOS machine locally but with a binary built for GNU/Linux in CI.

vitropy commented 10 months ago

To clarify, you would invoke tests like this example on your local workstation, assuming you've set ENTROPY_WORKSPACE_DIR via the entropy-workstation-setup facility.

ENTROPY_BINARY_DIR=$ENTROPY_WORKSPACE_DIR/entropy-core/target/release yarn test