Skip to content

Commit 0b091e8

Browse files
committed
update warnings to remove unnecessary build
1 parent 4eaa96f commit 0b091e8

File tree

1 file changed

+12
-44
lines changed

1 file changed

+12
-44
lines changed

.github/workflows/reviewdog.yml

Lines changed: 12 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,14 @@ jobs:
1010
uses: actions/checkout@v3.5.3
1111
with:
1212
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
1513
- name: Install specific golang
1614
uses: actions/setup-go@v4.0.1
1715
with:
1816
go-version: '1.20.14'
1917
- name: reviewdog-golangci-lint
2018
uses: reviewdog/action-golangci-lint@v2.3.1
2119
with:
20+
github_token: ${{ secrets.GITHUB_TOKEN }}
2221
go_version_file: go.mod
2322
golangci_lint_version: "v1.53.2"
2423
golangci_lint_flags: "-c .golangci.yml --allow-parallel-runners"
@@ -35,50 +34,19 @@ jobs:
3534
uses: actions/checkout@v3.5.3
3635
with:
3736
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
4037
- name: Install specific golang
4138
uses: actions/setup-go@v4.0.1
4239
with:
4340
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
5343
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

Comments
 (0)