This repository was archived by the owner on Oct 31, 2021. It is now read-only.
File tree 3 files changed +23
-3
lines changed
3 files changed +23
-3
lines changed Original file line number Diff line number Diff line change 16
16
local
17
17
values.local.yaml
18
18
Notes.md
19
- * terraform *
19
+ * terraform *
20
+ rest-api.xml
Original file line number Diff line number Diff line change @@ -70,12 +70,12 @@ build: $(GO) dependencies $(APP_GO_FILES)
70
70
$(call infoMsg,Building rest-api binary)
71
71
$(GO ) build -o $(LOCAL_BIN ) /monetr $(MONETR_CLI_PACKAGE )
72
72
73
- test : $(GO ) dependencies $(ALL_GO_FILES )
73
+ test : $(GO ) dependencies $(ALL_GO_FILES ) $( GOTESTSUM )
74
74
$(call infoMsg,Running go tests for monetr rest-api)
75
75
ifndef CI
76
76
$(GO) run $(MONETR_CLI_PACKAGE) database migrate -d $(POSTGRES_DB) -U $(POSTGRES_USER) -H $(POSTGRES_HOST)
77
77
endif
78
- $(GO) test -race -v -coverprofile=$(COVERAGE_TXT) -covermode=atomic $(GO_SRC_DIR)/...
78
+ $(GOTESTSUM) --junitfile $(PWD)/rest-api.xml -- -race -v -coverprofile=$(COVERAGE_TXT) -covermode=atomic $(GO_SRC_DIR)/...
79
79
$(GO) tool cover -func=$(COVERAGE_TXT)
80
80
81
81
clean :
@@ -182,3 +182,4 @@ migrate: $(GO)
182
182
beta-code : $(GO ) migrate
183
183
@$(GO ) run $(MONETR_CLI_PACKAGE ) beta new-code -d $(POSTGRES_DB ) -U $(POSTGRES_USER ) -H $(POSTGRES_HOST ) -P $(POSTGRES_PORT ) -W $(POSTGRES_PASSWORD )
184
184
185
+ all : build test generate lint
Original file line number Diff line number Diff line change @@ -159,6 +159,24 @@ install-$(GCLOUD): $(LOCAL_BIN) $(LOCAL_TMP) $(CURL)
159
159
tar -xzf $(GCLOUD_TAR ) -C $(LOCAL_BIN )
160
160
rm -rf $(GCLOUD_TAR )
161
161
162
+ GOTESTSUM =$(LOCAL_BIN ) /gotestsum
163
+ $(GOTESTSUM ) :
164
+ @if [ ! -f " $( GOTESTSUM) " ]; then $(MAKE ) install-$(GOTESTSUM ) ; fi
165
+
166
+ install-$(GOTESTSUM ) : GOTESTSUM_VERSION=1.7.0
167
+ install-$(GOTESTSUM ) : GOTESTSUM_URL="https://github.com/gotestyourself/gotestsum/releases/download/v$(GOTESTSUM_VERSION ) /gotestsum_$(GOTESTSUM_VERSION ) _$(OS ) _$(ARCH ) .tar.gz"
168
+ install-$(GOTESTSUM ) : GOTESTSUM_DIR=$(LOCAL_TMP ) /gotestsum
169
+ install-$(GOTESTSUM ) : GOTESTSUM_TAR=$(GOTESTSUM_DIR ) .tar.gz
170
+ install-$(GOTESTSUM ) : $(LOCAL_BIN ) $(LOCAL_TMP ) $(CURL )
171
+ $(call infoMsg,Installing gotestsum to $(GOTESTSUM ) )
172
+ -rm -rf $(GOTESTSUM_DIR )
173
+ mkdir -p $(GOTESTSUM_DIR )
174
+ curl -SsL $(GOTESTSUM_URL ) --output $(GOTESTSUM_TAR )
175
+ tar -xzf $(GOTESTSUM_TAR ) -C $(GOTESTSUM_DIR )
176
+ cp $(GOTESTSUM_DIR ) /gotestsum $(GOTESTSUM )
177
+ rm -rf $(GOTESTSUM_DIR )
178
+ rm -rf $(GOTESTSUM_TAR )
179
+
162
180
ifneq ($(ENV_LOWER ) ,local)
163
181
KUBECTL =$(LOCAL_BIN ) /kubectl
164
182
$(KUBECTL ) :
You can’t perform that action at this time.
0 commit comments