-
Notifications
You must be signed in to change notification settings - Fork 0
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
3 changed files
with
150 additions
and
0 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,17 @@ | ||
|
||
name: test-ci | ||
|
||
on: [push] | ||
|
||
jobs: | ||
test: | ||
needs: pre_job | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: test | ||
uses: trapajim/go-pipeline-action@v1 | ||
with: | ||
go-version: '1.22.2' | ||
go-vet: true | ||
golangci-version: latest | ||
go-test-flags: './... -v' |
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 |
---|---|---|
|
@@ -19,3 +19,5 @@ | |
|
||
# Go workspace file | ||
go.work | ||
.idea | ||
.DS_STORE |
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,131 @@ | ||
run: | ||
# Include test files or not. | ||
# Default: true | ||
tests: false | ||
issues-exit-code: 2 | ||
|
||
# If set we pass it to "go list -mod={option}". From "go help modules": | ||
# If invoked with -mod=readonly, the go command is disallowed from the implicit | ||
# automatic updating of go.mod described above. Instead, it fails when any changes | ||
# to go.mod are needed. This setting is most useful to check that go.mod does | ||
# not need updates, such as in a continuous integration and testing system. | ||
# If invoked with -mod=vendor, the go command assumes that the vendor | ||
# directory holds the correct copies of dependencies and ignores | ||
# the dependency descriptions in go.mod. | ||
# | ||
# Allowed values: readonly|vendor|mod | ||
# By default, it isn't set. | ||
modules-download-mode: readonly | ||
|
||
# Define the Go version limit. | ||
# Mainly related to generics support since go1.18. | ||
# Default: use Go version from the go.mod file, fallback on the env var `GOVERSION`, fallback on 1.18 | ||
go: '1.18' | ||
|
||
linters: | ||
# Disable all linters. | ||
# Default: false | ||
disable-all: true | ||
# Enable specific linter | ||
# https://golangci-lint.run/usage/linters/#enabled-by-default | ||
enable: | ||
- typecheck | ||
- errcheck | ||
- ineffassign | ||
- govet | ||
- staticcheck | ||
- gofmt | ||
- cyclop | ||
- asciicheck | ||
- bidichk | ||
- bodyclose | ||
- contextcheck | ||
- dupl | ||
- errchkjson | ||
- errorlint | ||
- execinquery | ||
- exhaustive | ||
- exportloopref | ||
- funlen | ||
- gocognit | ||
- gosec | ||
- loggercheck | ||
- makezero | ||
- noctx | ||
- reassign | ||
- rowserrcheck | ||
- sqlclosecheck | ||
- nilerr | ||
- durationcheck | ||
- asasalint | ||
- forbidigo | ||
# - containedctx | ||
# - deadcode | ||
# - decorder | ||
# - depguard | ||
# - dogsled | ||
# - dupword | ||
# - errname | ||
# - exhaustivestruct | ||
# - exhaustruct | ||
# - forcetypeassert | ||
# - gci | ||
# - gochecknoglobals | ||
# - gochecknoinits | ||
# - goconst | ||
# - gocritic | ||
# - gocyclo | ||
# - godot | ||
# - godox | ||
# - goerr113 | ||
# - gofumpt | ||
# - goheader | ||
# - goimports | ||
# - golint | ||
# - gomnd | ||
# - gomoddirectives | ||
# - gomodguard | ||
# - goprintffuncname | ||
# - gosimple | ||
# - grouper | ||
# - ifshort | ||
# - importas | ||
# - interfacebloat | ||
# - interfacer | ||
# - ireturn | ||
# - lll | ||
# - maintidx | ||
# - maligned | ||
# - misspell | ||
# - nakedret | ||
# - nestif | ||
# - nilnil | ||
# - nlreturn | ||
# - nolintlint | ||
# - nonamedreturns | ||
# - nosnakecase | ||
# - nosprintfhostport | ||
# - paralleltest | ||
# - prealloc | ||
# - predeclared | ||
# - promlinter | ||
# - revive | ||
# - scopelint | ||
# - structcheck | ||
# - stylecheck | ||
# - tagliatelle | ||
# - tenv | ||
# - testableexamples | ||
# - testpackage | ||
# - thelper | ||
# - tparallel | ||
# - unconvert | ||
# - unparam | ||
# - unused | ||
# - usestdlibvars | ||
# - varcheck | ||
# - varnamelen | ||
# - wastedassign | ||
# - whitespace | ||
# - wrapcheck | ||
# - wsl |