Skip to content

Commit 73a34fd

Browse files
Makefile: add integration tests run command
1 parent 182aa1d commit 73a34fd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ GOINSTALL := GO111MODULE=on go install -v
1818
GOTEST := GO111MODULE=on go test
1919

2020
GOLIST := go list -deps $(PKG)/... | grep '$(PKG)'
21+
GOLIST_IT := go list -tags=integration_test -deps $(PKG)/... | grep '$(PKG)'
2122
GOLIST_COVER := $$(go list -deps $(PKG)/... | grep '$(PKG)')
2223
GOFILES_NOVENDOR = $(shell find . -type f -name '*.go' -not -path "./vendor/*")
2324

@@ -91,6 +92,11 @@ unit:
9192
@$(call print, "Running unit tests.")
9293
$(GOLIST) | $(XARGS) env $(GOTEST) -test.timeout=20m
9394

95+
#? integration: Run all integration tests (Docker needed for Postgres)
96+
integration:
97+
@$(call print, "Running integration tests (Postgres + SQLite).")
98+
$(GOLIST_IT) | $(XARGS) env $(GOTEST) -tags=integration_test -test.timeout=30m
99+
94100
#? unit-cover: Run unit coverage tests
95101
unit-cover: $(GOACC_BIN)
96102
@$(call print, "Running unit coverage tests.")

0 commit comments

Comments
 (0)