From 30e114584ca584d0c5762e3f34b426bee547f852 Mon Sep 17 00:00:00 2001 From: edwin o Date: Mon, 7 Feb 2022 00:34:57 +0100 Subject: [PATCH 1/2] Bootstrapping test infrastructure. --- Makefile | 14 ++++++++++++++ tests/.gitkeep | 0 2 files changed, 14 insertions(+) create mode 100644 Makefile create mode 100644 tests/.gitkeep diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..33e56dc --- /dev/null +++ b/Makefile @@ -0,0 +1,14 @@ +.PHONY: all deps test build + +all: deps test build + +deps: + @go mod vendor + @go mod tidy + +test: + @go vet ./{internal,resources}/... + @go test -v -race -cover ./{cmd,handler}/... + +install: + @go install . diff --git a/tests/.gitkeep b/tests/.gitkeep new file mode 100644 index 0000000..e69de29 From 10ed671959b83e8ecc4024c2042cd8befc9405a7 Mon Sep 17 00:00:00 2001 From: edwin o Date: Mon, 7 Feb 2022 00:36:01 +0100 Subject: [PATCH 2/2] Update documentation --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 34a1399..2d937bd 100644 --- a/README.md +++ b/README.md @@ -90,3 +90,9 @@ where *8888* is a port to listen on. /missions/{mission-id} # get mission by it's id /explorers/{explorer-address} # get missions joined by explorer address ``` + +#### Running tests +From the root of the project, run +```sh +make test +```