ci: use go tool (#25)
CI / Check PR Title (push) Has been skipped
CI / Go Lint (push) Successful in 1m23s
CI / Makefile Lint (push) Successful in 1m17s
CI / Markdown Lint (push) Successful in 47s
CI / Unit Tests (push) Successful in 1m12s
CI / Fuzz Tests (push) Successful in 2m16s
CI / Mutation Tests (push) Successful in 1m39s
CI / Check PR Title (push) Has been skipped
CI / Go Lint (push) Successful in 1m23s
CI / Makefile Lint (push) Successful in 1m17s
CI / Markdown Lint (push) Successful in 47s
CI / Unit Tests (push) Successful in 1m12s
CI / Fuzz Tests (push) Successful in 2m16s
CI / Mutation Tests (push) Successful in 1m39s
## Description Tool versions were not pinned to the repository: this caused issues with upgrades. ## Changes - Use `go tool` for `checkmake`, `gremlins`, `golangci-lint`, `godoc` and `govulncheck`. ### Design Decisions ## Checklist - [x] Tests pass - [x] Docs updated Reviewed-on: #25 Co-authored-by: M.V. Hutz <git@maximhutz.me> Co-committed-by: M.V. Hutz <git@maximhutz.me>
This commit was merged in pull request #25.
This commit is contained in:
@@ -4,17 +4,13 @@ help: ## Show this help
|
||||
@grep -E '^[a-zA-Z_-]+:.*##' $(MAKEFILE_LIST) | awk -F ':.*## ' '{printf " %-15s %s\n", $$1, $$2}'
|
||||
|
||||
install: ## Install dev tools
|
||||
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
|
||||
go install github.com/checkmake/checkmake/cmd/checkmake@latest
|
||||
go install github.com/go-gremlins/gremlins/cmd/gremlins@latest
|
||||
go install golang.org/x/tools/cmd/godoc@latest
|
||||
go install golang.org/x/vuln/cmd/govulncheck@latest
|
||||
go mod download
|
||||
|
||||
test-unit: ## Run unit tests with coverage
|
||||
go test ./... -cover -v
|
||||
|
||||
test-mutation: ## Run mutation tests with gremlins
|
||||
gremlins unleash
|
||||
go tool gremlins unleash
|
||||
|
||||
FUZZ_TIME ?= 30
|
||||
|
||||
@@ -27,10 +23,10 @@ test-fuzz: ## Run all fuzz tests for 30s each
|
||||
test: test-unit test-mutation test-fuzz ## Run all tests
|
||||
|
||||
lint-go: ## Lint Go code
|
||||
golangci-lint run ./...
|
||||
go tool golangci-lint run ./...
|
||||
|
||||
lint-makefile: ## Lint the Makefile
|
||||
checkmake Makefile
|
||||
go tool checkmake Makefile
|
||||
|
||||
lint-markdown: ## Lint Markdown files
|
||||
docker run --rm -v $(CURDIR):/workdir davidanson/markdownlint-cli2 "**/*.md"
|
||||
@@ -39,7 +35,7 @@ lint: lint-go lint-makefile lint-markdown ## Lint all code
|
||||
|
||||
docs: ## Serve godoc locally
|
||||
@echo ">>> Visit: http://localhost:6060/pkg/$$(go list -m)"
|
||||
godoc -http=:6060
|
||||
go tool godoc -http=:6060
|
||||
|
||||
clean: ## Clean build and test caches
|
||||
go clean -cache -testcache
|
||||
|
||||
Reference in New Issue
Block a user