Skip to content

Commit

Permalink
chore: Don't be verbose with tests locally (#620)
Browse files Browse the repository at this point in the history
It can sometimes be unwieldy when running tests with the verbose flag. This changes the Makefile to run tests without the flag by default but with the flag set on GitHub Actions.

Signed-off-by: Ian Lewis <ianlewis@google.com>
  • Loading branch information
ianlewis committed May 26, 2023
1 parent 93d3f8c commit 7e2c7ae
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,25 @@ node_modules/.installed: package.json package-lock.json

.PHONY: unit-test
unit-test: ## Runs all unit tests.
go mod vendor
# NOTE: go test builds packages even if there are no tests.
go test -mod=vendor -v ./...
@ # NOTE: go test builds packages even if there are no tests.
@set -e;\
go mod vendor; \
extraargs=""; \
if [ "$(OUTPUT_FORMAT)" == "github" ]; then \
extraargs="-v"; \
fi; \
go test -mod=vendor $$extraeargs ./...

.PHONY: regression-test
regression-test: ## Runs all regression and unit tests.
go mod vendor
# NOTE: go test builds packages even if there are no tests.
go test -mod=vendor -tags=regression -v -timeout=25m ./...
@ # NOTE: go test builds packages even if there are no tests.
@set -e;\
go mod vendor; \
extraargs=""; \
if [ "$(OUTPUT_FORMAT)" == "github" ]; then \
extraargs="-v"; \
fi; \
go test -mod=vendor -tags=regression $$extraeargs -timeout=25m ./...

## Tools
#####################################################################
Expand Down

0 comments on commit 7e2c7ae

Please sign in to comment.