Skip to content

chore: update go versions #4

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

Merged
merged 1 commit into from
Feb 18, 2023
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
10 changes: 2 additions & 8 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
18 changes: 11 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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 ./...
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/gkampitakis/go-diff

go 1.16
go 1.20