From 7a73c6bc3ed012130a23c3dca3107ba43ea3748e Mon Sep 17 00:00:00 2001 From: 6543 <6543@noreply.gitea.io> Date: Sun, 26 Jan 2020 22:26:49 +0000 Subject: [PATCH] Makefile: export test env var (#234) exporte test var to env on test target Co-authored-by: 6543 <6543@obermui.de> Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/234 Reviewed-by: techknowlogick Reviewed-by: John Olheiser --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index f574f47..da40a68 100644 --- a/Makefile +++ b/Makefile @@ -48,7 +48,8 @@ revive: .PHONY: test test: - @if [ -z "$(shell curl --noproxy "*" "${GITEA_SDK_TEST_URL}/api/v1/version" 2> /dev/null)" ]; then \echo "No test-instance detected!"; exit 1; else \ + @export GITEA_SDK_TEST_URL=${GITEA_SDK_TEST_URL}; export GITEA_SDK_TEST_USERNAME=${GITEA_SDK_TEST_USERNAME}; export GITEA_SDK_TEST_PASSWORD=${GITEA_SDK_TEST_PASSWORD}; \ + if [ -z "$(shell curl --noproxy "*" "${GITEA_SDK_TEST_URL}/api/v1/version" 2> /dev/null)" ]; then \echo "No test-instance detected!"; exit 1; else \ cd gitea && $(GO) test -cover -coverprofile coverage.out; \ fi @@ -85,4 +86,4 @@ golangci-lint: export BINARY="golangci-lint"; \ curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(GOPATH)/bin v1.22.2; \ fi - golangci-lint run --timeout 5m \ No newline at end of file + golangci-lint run --timeout 5m