diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 0d0ea13..3aa000e 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -21,7 +21,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: 1.19.x + go-version: 1.20.x - uses: actions/checkout@v3 - name: golangci-lint uses: golangci/golangci-lint-action@v3 @@ -36,13 +36,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go: - [ - "1.16.x", - "1.17.x", - "1.18.x", - "1.19.x", - ] + go: ["1.18.x", "1.19.x", "1.20.x"] steps: - uses: actions/checkout@v3 - name: Setup go diff --git a/Makefile b/Makefile index 17c9c1b..e89b2c8 100644 --- a/Makefile +++ b/Makefile @@ -1,23 +1,27 @@ -.PHONY: install-tools lint test test-verbose format benchmark +.PHONY: help install-tools lint test test-verbose format benchmark +.SILENT: help install-tools lint test test-verbose format benchmark -install-tools: +help: + grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' + +install-tools: ## Install linting tools # Install linting tools go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.49.0 go install mvdan.cc/gofumpt@latest go install github.com/segmentio/golines@latest -lint: +lint: ## Run golangci linter golangci-lint run -c ./golangci.yml ./... -format: +format: ## Format code gofumpt -l -w -extra . golines . -w -test: +test: ## Run tests go test -race -test.timeout 120s -count=1 ./... -test-verbose: +test-verbose: ## Run tests with verbose output go test -race -test.timeout 120s -v -cover -count=1 ./... -benchmark: +benchmark: ## Run benchmarks go test -bench=. -benchmem ./... diff --git a/go.mod b/go.mod index d8926aa..f0a4fdc 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ module github.com/gkampitakis/go-diff -go 1.16 +go 1.20