-
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
65 additions
and
6 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,36 @@ | ||
name: CI | ||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
- 'release-**' | ||
pull_request: | ||
jobs: | ||
ci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.22" | ||
- name: Lint | ||
uses: golangci/golangci-lint-action@v6 | ||
with: | ||
version: latest | ||
# - name: Install protoc | ||
# uses: arduino/setup-protoc@v3 | ||
- name: Install protoc-gen-go | ||
run: | | ||
go install google.golang.org/protobuf/cmd/[email protected] | ||
go install google.golang.org/grpc/cmd/[email protected] | ||
- name: Verify codegen | ||
run: | | ||
export PATH="$PATH:$(go env GOPATH)/bin" | ||
make gen | ||
if [ -n "$(git status --porcelain)" ]; then | ||
echo $(git diff) | ||
echo "codegen is out of date. Please run \"make gen\" to update." | ||
exit 1 | ||
else | ||
echo "codegen is up to date." | ||
fi |
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,23 @@ | ||
run: | ||
timeout: 5m | ||
go: 1.22 | ||
|
||
linters: | ||
enable: | ||
- revive | ||
- goconst | ||
- gofmt | ||
- goimports | ||
- misspell | ||
- unparam | ||
disable: | ||
- deadcode | ||
|
||
issues: | ||
exclude-use-default: false | ||
exclude-rules: | ||
- path: _test.go | ||
linters: | ||
- errcheck | ||
exclude: | ||
- (comment on exported (method|function|type|const)|should have( a package)? comment|comment should be of the form) |
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