@@ -10,15 +10,14 @@ jobs:
10
10
uses : actions/checkout@v3.5.3
11
11
with :
12
12
fetch-depth : 0 # required for new-from-rev option in .golangci.yml
13
- - name : Install libraries
14
- run : sudo apt-get -y -q install libboost-math-dev
15
13
- name : Install specific golang
16
14
uses : actions/setup-go@v4.0.1
17
15
with :
18
16
go-version : ' 1.20.14'
19
17
- name : reviewdog-golangci-lint
20
18
uses : reviewdog/action-golangci-lint@v2.3.1
21
19
with :
20
+ github_token : ${{ secrets.GITHUB_TOKEN }}
22
21
go_version_file : go.mod
23
22
golangci_lint_version : " v1.53.2"
24
23
golangci_lint_flags : " -c .golangci.yml --allow-parallel-runners"
@@ -35,50 +34,19 @@ jobs:
35
34
uses : actions/checkout@v3.5.3
36
35
with :
37
36
fetch-depth : 0 # required for new-from-rev option in .golangci.yml
38
- - name : Install libraries
39
- run : sudo apt-get -y -q install libboost-math-dev
40
37
- name : Install specific golang
41
38
uses : actions/setup-go@v4.0.1
42
39
with :
43
40
go-version : ' 1.20.14'
44
- - name : Add bin to PATH
45
- run : |
46
- echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH
47
- echo "$RUNNER_WORKSPACE/$(basename $GITHUB_REPOSITORY)/bin" >> $GITHUB_PATH
48
- - name : Create folders for golangci-lint
49
- run : mkdir -p cicdtmp/golangci-lint
50
- - name : Check if custom golangci-lint is already built
51
- id : cache-golangci-lint
52
- uses : actions/cache@v3.3.1
41
+ - name : reviewdog-golangci-lint
42
+ uses : reviewdog/action-golangci-lint@v2.3.1
53
43
with :
54
- path : cicdtmp/golangci-lint/golangci-lint-cgo
55
- key : cicd-golangci-lint-cgo-v0.0.2
56
-
57
- - name : Build custom golangci-lint with CGO_ENABLED
58
- if : steps.cache-golangci-lint.outputs.cache-hit != 'true'
59
- run : |
60
- cd cicdtmp/golangci-lint
61
- git clone https://github.com/golangci/golangci-lint.git .
62
- git checkout tags/v1.53.2
63
- CGO_ENABLED=true go build -trimpath -o golangci-lint-cgo ./cmd/golangci-lint
64
- ./golangci-lint-cgo --version
65
- cd ../../
66
- - name : Install reviewdog
67
- run : |
68
- curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/v0.14.1/install.sh | sh -s
69
- reviewdog --version
70
- - name : Run golangci-lint with reviewdog
71
- env :
72
- REVIEWDOG_GITHUB_API_TOKEN : ${{ secrets.GITHUB_TOKEN }}
73
- run : >
74
- ./cicdtmp/golangci-lint/golangci-lint-cgo run
75
- --out-format line-number
76
- -c .golangci-warnings.yml
77
- --allow-parallel-runners
78
- | reviewdog
79
- -f=golangci-lint
80
- -name="Lint Warnings"
81
- -reporter=github-check
82
- -filter-mode=added
83
- -fail-on-error=false
84
- -level=warning
44
+ github_token : ${{ secrets.GITHUB_TOKEN }}
45
+ go_version_file : go.mod
46
+ golangci_lint_version : " v1.53.2"
47
+ golangci_lint_flags : " -c .golangci-warnings.yml --allow-parallel-runners"
48
+ reporter : " github-pr-check"
49
+ tool_name : " Lint Warnings"
50
+ level : " warning"
51
+ fail_on_error : false
52
+ filter_mode : " added"
0 commit comments