php-fpm-exporter/Makefile
Kieren Evans ea4a929fa9
fix: allow 10 seconds to shutdown, fixing shutdown error (#204)
* Allow 15 seconds to shut down

v2.0.0 and above crashes with message "Error during shutdowncontext deadline exceeded" and exit code 1
upon SIGINT being received.

v1.2.1 seems to be unaffected.

* Add bats test

* Reduce to 10 seconds, define directly

Co-Authored-By: andytson-inviqa <andytson-inviqa@users.noreply.github.com>

* style: gofmt -s

* chore: bump golang to 1.17 and fix golangci

Co-authored-by: andytson-inviqa <andytson-inviqa@users.noreply.github.com>
Co-authored-by: Enrico Stahn <enrico.stahn@gmail.com>
2022-02-09 09:45:36 +11:00

29 lines
694 B
Makefile

.PHONY: test
.DEFAULT_GOAL := help
help: ## List targets & descriptions
@cat Makefile* | grep -E '^[a-zA-Z_-]+:.*?## .*$$' | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
deps: ## Get dependencies
go get -d -v ./...
test: ## Run tests
go test -short ./...
test-coverage: ## Create a code coverage report
mkdir -p .cover
go test -coverprofile .cover/cover.out ./...
test-coverage-html: ## Create a code coverage report in HTML
mkdir -p .cover
go test -coverprofile .cover/cover.out ./...
go tool cover -html .cover/cover.out
test-e2e:
bats test/e2e.bats
lint: ## Run linters
golangci-lint run
fmt: ## Fix formatting issues
goimports -w .