diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 16efc79905..a8a41ca440 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -1,6 +1,6 @@ # This is a basic workflow to help you get started with Actions -name: golangci-lint +name: Golangci-Lint # Controls when the workflow will run on: @@ -18,28 +18,38 @@ jobs: # This workflow contains a single job called "build" golangci-lint: # The type of runner that the job will run on - runs-on: macos-12 + # runs-on: macos-12 + runs-on: ubuntu-latest # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3 + #- uses: actions/checkout@v3 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: fetch-depth: 0 ref: ${{ github.event.pull_request.head.sha }} - - uses: actions/setup-go@v3 + # - uses: actions/setup-go@v3 + - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: go-version-file: .go-version #go-version: '1.21' - cache: false + #cache: false # Runs a set of commands using the runners shell - name: golangci-lint - uses: golangci/golangci-lint-action@v3 + uses: reviewdog/action-golangci-lint@v2 with: - version: v1.45.2 - #version: v1.54 - working-directory: ./tencentcloud - args: --new-from-rev=origin/master -v - #args: --enable-all --max-same-issues=0 --max-issues-per-linter=0 --new-from-rev=origin/master -v + golangci_lint_flags: '--new-from-rev=origin/master --tests=false --timeout=25m --disable-all -E errcheck -v' + tool_name: errcheck + level: info + workdir: ./tencentcloud + #uses: golangci/golangci-lint-action@v3 + #with: + #version: 'v1.55.1' + #version: v1.45.2 + ##version: v1.54 + #working-directory: ./tencentcloud + #args: --new-from-rev=origin/master -v + ##args: --enable-all --max-same-issues=0 --max-issues-per-linter=0 --new-from-rev=origin/master -v