Skip to content

Commit 2b0ec1d

Browse files
authored
Merge pull request #2261 from tencentcloudstack/dev/build-parallelism
ci: update golang-ci parallel parameter
2 parents e88539d + 28546e0 commit 2b0ec1d

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
pull_request:
88
paths:
99
- tencentcloud/**
10+
- .github/**
11+
- .golangci.yml
1012

1113
# Allows you to run this workflow manually from the Actions tab
1214
workflow_dispatch:
@@ -29,11 +31,13 @@ jobs:
2931
- uses: actions/setup-go@v3
3032
with:
3133
go-version-file: .go-version
32-
cache: false
34+
cache: true
3335

3436
# Runs a set of commands using the runners shell
3537
- name: golangci-lint
3638
uses: golangci/golangci-lint-action@v3
3739
with:
3840
version: v1.45.2
3941
working-directory: ./tencentcloud
42+
args: --new-from-rev=master -v
43+
#args: --enable-all --max-same-issues=0 --max-issues-per-linter=0 --new-from-rev=master -v

.golangci.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,9 @@ linters-settings:
2929

3030
run:
3131
modules-download-mode: vendor
32-
timeout: 10m
32+
timeout: 15m
33+
# The default concurrency value is the number of available CPU.
34+
concurrency: 12
35+
# Allow multiple parallel golangci-lint instances running.
36+
# If false (default) - golangci-lint acquires file lock on start.
37+
allow-parallel-runners: true

0 commit comments

Comments
 (0)