Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests: fix Github workflows #294

Merged
merged 5 commits into from
Jul 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ test-examples: ## Execute the _examples
printf "\033[2m────────────────────────────────────────────────────────────────────────────────\n"; \
printf "\033[1mUpdating dependencies for $$d\033[0m\n"; \
printf "\033[2m────────────────────────────────────────────────────────────────────────────────\033[0m\n"; \
(cd $$d && go mod download) || \
(cd $$d && go mod download && make setup) || \
( \
printf "\033[31m────────────────────────────────────────────────────────────────────────────────\033[0m\n"; \
printf "\033[31;1m⨯ ERROR\033[0m\n"; \
Expand Down Expand Up @@ -152,7 +152,7 @@ lint: ## Run lint on the package
set -e ; \
trap "test -d ../../../.git && git checkout --quiet go.mod" INT TERM EXIT; \
echo "cd internal/build/ && go vet ./..."; \
cd "internal/build/" && go mod download && go vet ./...; \
cd "internal/build/" && go mod tidy && go mod download && go vet ./...; \
}


Expand Down
7 changes: 6 additions & 1 deletion _examples/bulk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ test-benchmarks: clean setup

setup:
@go get -u github.com/mailru/easyjson/...
cd benchmarks && go generate ./model
@go mod download github.com/dustin/go-humanize
@go mod download github.com/cenkalti/backoff/v4
@cd benchmarks && \
go mod download && \
go mod download github.com/mailru/easyjson && \
go generate ./model

clean:
@rm -f benchmarks/model/*_easyjson.go
Expand Down
4 changes: 3 additions & 1 deletion _examples/cloudfunction/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ GO_TEST_CMD = $(if $(shell which richgo),richgo test,go test)
test: ## Run tests
$(GO_TEST_CMD) -v ./...

.PHONY: test
setup:

.PHONY: test setup
2 changes: 2 additions & 0 deletions _examples/encoding/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ bench: clean setup # Run benchmarks

setup: ## Install & Setup
@go get -u github.com/mailru/easyjson/...
@go mod tidy
@go mod download
go generate ./model

clean: ## Remove artifacts
Expand Down
4 changes: 3 additions & 1 deletion _examples/extension/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ GO_TEST_CMD = $(if $(shell which richgo),richgo test,go test)
test: ## Run tests
go run main.go

.PHONY: test
setup:

.PHONY: test setup
6 changes: 5 additions & 1 deletion _examples/fasthttp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ test: ## Run tests
bench: ## Run benchmarks
$(GO_TEST_CMD) -run=none -bench=. -benchmem -benchtime=10s -v fasthttp_benchmark_test.go

.PHONY: test bench
setup:
@go mod tidy
@go mod download

.PHONY: test bench setup
6 changes: 5 additions & 1 deletion _examples/instrumentation/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@ test:
go build -o /dev/null opencensus.go
go build -o /dev/null apmelasticsearch.go

.PHONY: test
setup:
@go mod tidy
@go mod download

.PHONY: test setup
4 changes: 3 additions & 1 deletion _examples/logging/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ test: ## Run tests
go run default.go
go run custom.go

.PHONY: test
setup:

.PHONY: test setup
4 changes: 3 additions & 1 deletion _examples/security/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,6 @@ certificates-clean:
cluster-clean:
docker-compose --file elasticsearch-cluster.yml down --volumes

.PHONY: test test-integ certificates cluster certificates-clean cluster-clean
setup:

.PHONY: test test-integ certificates cluster certificates-clean cluster-clean setup
4 changes: 3 additions & 1 deletion _examples/xkcdsearch/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ GO_TEST_CMD = $(if $(shell which richgo),richgo test,go test)
test: ## Run tests
$(GO_TEST_CMD) -v ./...

.PHONY: test
setup:

.PHONY: test setup