From 6b6dbf24b33d057a7f81a4bf2c8da7c5ef3d375b Mon Sep 17 00:00:00 2001 From: Sayo Date: Wed, 14 Aug 2024 01:45:40 +0530 Subject: [PATCH] [Docs] add mockgen instructions to quickstart and makefile helper (#733) https://github.com/pokt-network/poktroll/issues/534 --------- Co-authored-by: Daniel Olshansky --- Makefile | 11 +++++++++++ docusaurus/docs/develop/developer_guide/quickstart.md | 10 ++++++++++ 2 files changed, 21 insertions(+) diff --git a/Makefile b/Makefile index 06a439867..c07fb3568 100644 --- a/Makefile +++ b/Makefile @@ -133,6 +133,17 @@ check_ignite_version: exit 1 ; \ fi +.PHONY: check_mockgen +# Internal helper target- Check if mockgen is installed +check_mockgen: + { \ + if ( ! ( command -v mockgen >/dev/null )); then \ + echo "Seems like you don't have `mockgen` installed. Please visit https://github.com/golang/mock#installation and follow the instructions to install `mockgen` before continuing"; \ + exit 1; \ + fi; \ + } + + .PHONY: check_act # Internal helper target - check if `act` is installed check_act: diff --git a/docusaurus/docs/develop/developer_guide/quickstart.md b/docusaurus/docs/develop/developer_guide/quickstart.md index c6370752a..6d07c0d5c 100644 --- a/docusaurus/docs/develop/developer_guide/quickstart.md +++ b/docusaurus/docs/develop/developer_guide/quickstart.md @@ -138,6 +138,16 @@ available commands. Looking inside the Makefile is a great way to learn how to u ### 1.3 Prepare your development environment +Run the following command to install `golang` dependencies: +```bash +make install_ci_deps +``` + +If you encounter issues related to `mockgen` not being found or failing, try running the following command to verify its installation: +```bash +make check_mockgen +``` + Compile protobufs, generate mocks and verify that all tests are passing by running: ```bash