-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* quick POC for generic implementation * disable non-1.18 compat linters * fix Example * embed options into Cache interface Co-authored-by: Dmitry Verkhoturov <[email protected]>
- Loading branch information
Showing
10 changed files
with
664 additions
and
14 deletions.
There are no files selected for viewing
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,48 @@ | ||
name: build-v2 | ||
|
||
on: | ||
push: | ||
branches: | ||
tags: | ||
paths: | ||
- ".github/workflows/ci-v2.yml" | ||
- "v2/**" | ||
pull_request: | ||
paths: | ||
- ".github/workflows/ci-v2.yml" | ||
- "v2/**" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: set up go 1.18 | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.18 | ||
id: go | ||
|
||
- name: checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: build and test | ||
run: | | ||
go test -timeout=60s -race -covermode=atomic -coverprofile=$GITHUB_WORKSPACE/profile.cov | ||
go build -race | ||
working-directory: v2 | ||
|
||
- name: install golangci-lint and goveralls | ||
run: | | ||
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $GITHUB_WORKSPACE v1.46.2 | ||
GO111MODULE=off go get -u -v github.com/mattn/goveralls | ||
- name: run linters | ||
run: $GITHUB_WORKSPACE/golangci-lint run --out-format=github-actions | ||
working-directory: v2 | ||
|
||
- name: submit coverage | ||
run: $(go env GOPATH)/bin/goveralls -service="github" -coverprofile=$GITHUB_WORKSPACE/profile.cov | ||
env: | ||
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
working-directory: v2 |
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
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
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
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,64 @@ | ||
linters-settings: | ||
govet: | ||
check-shadowing: true | ||
golint: | ||
min-confidence: 0 | ||
gocyclo: | ||
min-complexity: 15 | ||
maligned: | ||
suggest-new: true | ||
goconst: | ||
min-len: 2 | ||
min-occurrences: 2 | ||
misspell: | ||
locale: US | ||
lll: | ||
line-length: 140 | ||
gocritic: | ||
enabled-tags: | ||
- performance | ||
- style | ||
- experimental | ||
disabled-checks: | ||
- wrapperFunc | ||
|
||
linters: | ||
enable: | ||
- megacheck | ||
- revive | ||
- govet | ||
- unconvert | ||
- megacheck | ||
#- structcheck | ||
- gas | ||
- gocyclo | ||
- dupl | ||
- misspell | ||
#- unparam | ||
- varcheck | ||
- deadcode | ||
- typecheck | ||
- ineffassign | ||
- varcheck | ||
- stylecheck | ||
- gochecknoinits | ||
- exportloopref | ||
#- gocritic | ||
- nakedret | ||
- gosimple | ||
- prealloc | ||
fast: false | ||
disable-all: true | ||
|
||
run: | ||
output: | ||
format: tab | ||
skip-dirs: | ||
- vendor | ||
|
||
issues: | ||
exclude-rules: | ||
- text: "should have a package comment, unless it's in another file for this package" | ||
linters: | ||
- golint | ||
exclude-use-default: false |
Oops, something went wrong.