Skip to content

Commit

Permalink
Fix mock generation in CI (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
ehl-jf authored Dec 6, 2024
1 parent f00ded0 commit dfc54fd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ GOLANGCI_LINT:

########## BUILD ##########
prereq::
${GOCMD} install github.com/jstemmer/go-junit-report@v1.0.0
$(GOCMD) install github.com/jstemmer/go-junit-report@v1.0.0
GOBIN=${TOOLS_DIR} $(GOCMD) install go.uber.org/mock/mockgen@v0.5.0

build::
go env GOOS GOARCH
Expand All @@ -67,7 +68,7 @@ clean-mock:
.PHONY: generate-mock
generate-mock: clean-mock
@echo Generating test mocks
go generate ./...
TOOLS_DIR=$(TOOLS_DIR) go generate ./...

test-prereq: prereq generate-mock
mkdir -p target/reports
Expand Down
2 changes: 1 addition & 1 deletion commands/common/cmd_commons.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package common

//go:generate mockgen -source=${GOFILE} -destination=mocks/${GOFILE}
//go:generate ${TOOLS_DIR}/mockgen -source=${GOFILE} -destination=mocks/${GOFILE}

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion commands/common/manifest.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package common

//go:generate mockgen -source=${GOFILE} -destination=mocks/${GOFILE}
//go:generate ${TOOLS_DIR}/mockgen -source=${GOFILE} -destination=mocks/${GOFILE}

import (
"encoding/json"
Expand Down

0 comments on commit dfc54fd

Please sign in to comment.