Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copyonwrite/367/fix make error mockery #368

Merged
merged 3 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ ifeq ($(wildcard .env),.env)
export $(shell sed 's/=.*//' .env)
endif

all: build-binary test-all

build-binary: mockery gqlgen
GO_ENABLED=0 go build -ldflags="$(LDFLAGS)" -o build/heureka cmd/heureka/main.go

Expand Down Expand Up @@ -62,9 +64,13 @@ run:
gqlgen:
cd internal/api/graphql && go run github.com/99designs/gqlgen generate

mockery:
mockery: install-build-dependencies
mockery

install-build-dependencies:
go install github.com/vektra/mockery/[email protected]


GINKGO := go run github.com/onsi/ginkgo/v2/ginkgo
test-all: mockery gqlgen
$(GINKGO) -r
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ Use the following command in the root folder of heureka:

Heureka uses [Mockery](https://vektra.github.io/mockery/) for building Mocks based on defined interfaces for the purpose of Unit-Testing.

Please [follow the steps to install mockery on your local system](https://vektra.github.io/mockery/latest/installation/) to be able to build mocks.
The Makefile/Dockerfile take care of installing mockery via

go install github.com/vektra/mockery/[email protected]

#### Using Ginkgo

Expand Down
Loading