integration test: run integration tests in GA

This commit is contained in:
ramil
2021-04-19 14:43:21 +03:00
parent c813ff00f4
commit 50d53535bb
5 changed files with 185 additions and 135 deletions
+5 -5
View File
@@ -67,11 +67,11 @@ test: | $(GINKGO) $(GOOSE)
integrationtest: | $(GINKGO) $(GOOSE)
go vet ./...
go fmt ./...
export PGPASSWORD=$(DATABASE_PASSWORD)
dropdb -h $(DATABASE_HOSTNAME) -p $(DATABASE_PORT) -U $(DATABASE_USER) --if-exists $(TEST_DB)
createdb -h $(DATABASE_HOSTNAME) -p $(DATABASE_PORT) -U $(DATABASE_USER) $(TEST_DB)
$(GOOSE) -dir db/migrations postgres "$(TEST_CONNECT_STRING)" up
$(GINKGO) -r integration_test/
#export PGPASSWORD=$(DATABASE_PASSWORD)
#dropdb -h $(DATABASE_HOSTNAME) -p $(DATABASE_PORT) -U $(DATABASE_USER) --if-exists $(TEST_DB)
#createdb -h $(DATABASE_HOSTNAME) -p $(DATABASE_PORT) -U $(DATABASE_USER) $(TEST_DB)
#$(GOOSE) -dir db/migrations postgres "$(TEST_CONNECT_STRING)" up
$(GINKGO) -r test/ -v
.PHONY: test_local
test_local: | $(GINKGO) $(GOOSE)