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 <techknowlogick@gitea.io>
Reviewed-by: John Olheiser <john.olheiser@gmail.com>
This commit is contained in:
6543 2020-01-26 22:26:49 +00:00 committed by techknowlogick
parent 92f764ddf4
commit 7a73c6bc3e
1 changed files with 3 additions and 2 deletions

View File

@ -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
golangci-lint run --timeout 5m