Makefile: export test env var #234

Merged
techknowlogick merged 1 commits from 6543/go-sdk:export-env into master 2020-01-26 22:26:51 +00:00

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