Skip to content

Commit

Permalink
ci: add github action for golangci
Browse files Browse the repository at this point in the history
  • Loading branch information
wenfengwang committed Apr 11, 2022
1 parent e700173 commit 0db357e
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: golangci-lint
on:
push:
tags:
- v*
branches:
- master
- main
pull_request:
permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
# pull-requests: read
jobs:
golangci:
strategy:
matrix:
go-version: [1.17.x]
os: [macos-latest]
name: lint
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-go@v2
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.43
# Optional: working directory, useful for monorepos
# working-directory: somedir

# Optional: golangci-lint command line arguments.
# args: --issues-exit-code=0

# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true
2 changes: 0 additions & 2 deletions cmd/controller/trigger/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
"flag"
"fmt"
"github.com/linkall-labs/vanus/internal/controller/trigger"
"github.com/linkall-labs/vanus/internal/primitive/interceptor/grpc_error"
"github.com/linkall-labs/vanus/internal/util"
"github.com/linkall-labs/vanus/internal/util/signal"
"github.com/linkall-labs/vanus/observability/log"
Expand Down Expand Up @@ -54,7 +53,6 @@ func main() {
os.Exit(-1)
}
var opts []grpc.ServerOption
opts = append(opts, grpc_error.GRPCErrorServerOutboundInterceptor()...)
grpcServer := grpc.NewServer(opts...)
controller.RegisterTriggerControllerServer(grpcServer, srv)
log.Info(ctx, "the TriggerControlServer ready to work", map[string]interface{}{
Expand Down

0 comments on commit 0db357e

Please sign in to comment.