Skip to content

refactor(ci): golangci-lint refactor #2615

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 21 additions & 11 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
Loading