-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
399 additions
and
265 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Test | ||
on: | ||
push: | ||
branches: | ||
- "*" | ||
paths-ignore: | ||
- "README.md" | ||
tags-ignore: | ||
- "*" | ||
env: | ||
GO_VERSION: "1.22.5" | ||
GOFLAGS: -buildvcs=false | ||
GOPROXY: https://proxy.golang.org,direct | ||
jobs: | ||
lint: | ||
name: Run make lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
- run: make lint | ||
test: | ||
name: Run make test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
- run: make test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ | |
### Go Patch ### | ||
/vendor/ | ||
/Godeps/ | ||
go.sum | ||
/bin | ||
|
||
### Vim ### | ||
# Swap | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
run: | ||
timeout: 5m | ||
allow-parallel-runners: true | ||
|
||
issues: | ||
exclude-use-default: false | ||
linters: | ||
disable-all: true | ||
enable: | ||
- bidichk | ||
- bodyclose | ||
- containedctx | ||
- errcheck | ||
- exportloopref | ||
- ginkgolinter | ||
- goconst | ||
- gocritic | ||
- gocyclo | ||
- gofmt | ||
- goimports | ||
- gosimple | ||
- govet | ||
- inamedparam | ||
- ineffassign | ||
- misspell | ||
- nakedret | ||
- prealloc | ||
- staticcheck | ||
- tenv | ||
- typecheck | ||
- unconvert | ||
- unparam | ||
- unused | ||
- whitespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
.PHONY: fmt | ||
fmt: | ||
go fmt ./... | ||
|
||
.PHONY: vet | ||
vet: | ||
go vet ./... | ||
|
||
.PHONY: test | ||
test: | ||
go test -race -cover ./... | ||
|
||
.PHONY: lint | ||
lint: golangci-lint | ||
$(GOLANGCI_LINT) run | ||
|
||
LOCALBIN ?= $(shell pwd)/bin | ||
$(LOCALBIN): | ||
mkdir -p $(LOCALBIN) | ||
|
||
GOLANGCI_LINT = $(shell pwd)/bin/golangci-lint | ||
GOLANGCI_LINT_VERSION ?= v1.59.1 | ||
.PHONY: golangci-lint | ||
golangci-lint: | ||
@[ -f $(GOLANGCI_LINT) ] || { \ | ||
set -e ;\ | ||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell dirname $(GOLANGCI_LINT)) $(GOLANGCI_LINT_VERSION) ;\ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.