-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: configure CI/CD and linting for Go project
- Add `.golangci.yml` configuration file with specific linters enabled and a 3-minute timeout for the run - Add `.goreleaser.yaml` configuration file with build skipping and changelog grouping based on commit message patterns Signed-off-by: appleboy <[email protected]>
- Loading branch information
Showing
2 changed files
with
67 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,39 @@ | ||
linters: | ||
enable-all: false | ||
disable-all: true | ||
fast: false | ||
enable: | ||
- bodyclose | ||
- dogsled | ||
- dupl | ||
- errcheck | ||
- exportloopref | ||
- exhaustive | ||
- gochecknoinits | ||
- goconst | ||
- gocritic | ||
- gocyclo | ||
- gofmt | ||
- goimports | ||
- goprintffuncname | ||
- gosec | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
- lll | ||
- misspell | ||
- nakedret | ||
- noctx | ||
- nolintlint | ||
- rowserrcheck | ||
- staticcheck | ||
- stylecheck | ||
- typecheck | ||
- unconvert | ||
- unparam | ||
- unused | ||
- whitespace | ||
- gofumpt | ||
|
||
run: | ||
timeout: 3m |
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 @@ | ||
builds: | ||
- # If true, skip the build. | ||
# Useful for library projects. | ||
# Default is false | ||
skip: true | ||
|
||
changelog: | ||
use: github | ||
groups: | ||
- title: Features | ||
regexp: "^.*feat[(\\w)]*:+.*$" | ||
order: 0 | ||
- title: "Bug fixes" | ||
regexp: "^.*fix[(\\w)]*:+.*$" | ||
order: 1 | ||
- title: "Enhancements" | ||
regexp: "^.*chore[(\\w)]*:+.*$" | ||
order: 2 | ||
- title: "Refactor" | ||
regexp: "^.*refactor[(\\w)]*:+.*$" | ||
order: 3 | ||
- title: "Build process updates" | ||
regexp: ^.*?(build|ci)(\(.+\))??!?:.+$ | ||
order: 4 | ||
- title: "Documentation updates" | ||
regexp: ^.*?docs?(\(.+\))??!?:.+$ | ||
order: 4 | ||
- title: Others |