Skip to content

Commit

Permalink
fix:golangci lint run
Browse files Browse the repository at this point in the history
  • Loading branch information
CocaineCong committed Jan 3, 2024
1 parent 2630fad commit 16fc98c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 20 deletions.
49 changes: 29 additions & 20 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,35 +15,44 @@
# specific language governing permissions and limitations
# under the License.

name: golangci-lint
name: "golang ci lint"

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches:
- main
- dev
branches: [ main ]
pull_request:
branches:
- main
- dev
branches: "*"

permissions:
contents: read
# Allows you to run this workflow manually from the Actions tab
# workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
golangci:
name: lint
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
strategy:
matrix:
golang:
- 1.18

- uses: actions/setup-go@v4
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: "set up go"
uses: actions/setup-go@v3
with:
go-version: '1.20'
cache: false
go-version: 1.18

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: "checkout ${{ github.ref }}"
uses: actions/checkout@v3

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
- name: "golang ci lint"
uses: golangci/golangci-lint-action@v3.1.0
with:
version: v1.54
args: --timeout=10m
version: v1.49.0
args: --timeout=10m
skip-go-installation: true
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ require (
github.com/micro/go-micro/v2 v2.9.1
github.com/milvus-io/milvus-sdk-go/v2 v2.3.1
github.com/orcaman/concurrent-map/v2 v2.0.1
github.com/pingcap/errors v0.11.4
github.com/pkg/errors v0.9.1
github.com/redis/go-redis/v9 v9.2.1
github.com/robfig/cron/v3 v3.0.1
Expand Down

0 comments on commit 16fc98c

Please sign in to comment.