diff --git a/README.md b/README.md index e867eee..37fb4ec 100644 --- a/README.md +++ b/README.md @@ -228,7 +228,15 @@ Most of the functions that we have re-exported expected `*chaincfg.Params` as an 1. Install Docker 2. Install Docker Compose 3. Run Docker -4. Run `./test.sh` +4. Clone with submodules, or initialize them in an existing checkout: + +```sh +git submodule update --init --recursive +``` + +5. Run `./test.sh` + +The test script also initializes submodules when it is run inside a Git checkout. Example output: diff --git a/test.sh b/test.sh index e0b03f1..ba35b5b 100755 --- a/test.sh +++ b/test.sh @@ -1,7 +1,14 @@ +#!/usr/bin/env bash +set -euo pipefail + +if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then + git submodule update --init --recursive +fi + source ./infra/.env docker-compose -f ./infra/docker-compose.yaml up --build -d +trap 'docker-compose -f ./infra/docker-compose.yaml down' EXIT echo "Waiting for multichain to boot..." sleep 30 go test -v ./... -docker-compose -f ./infra/docker-compose.yaml down -echo "Done!" \ No newline at end of file +echo "Done!"