Skip to content

Commit ce4c0f7

Browse files
committed
chore: use golangci-lint actions
1 parent 423129a commit ce4c0f7

File tree

2 files changed

+27
-11
lines changed

2 files changed

+27
-11
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ on:
66
- main
77
pull_request:
88

9-
env:
10-
GOLANGCI_LINT_VERSION: v1.61.0
11-
129
jobs:
1310
build-lint-test:
1411
name: CI
@@ -20,7 +17,7 @@ jobs:
2017
- name: Setup go
2118
uses: actions/setup-go@v5
2219
with:
23-
go-version-file: go.mod
20+
go-version-file: ./go.mod
2421

2522
- name: Setup Mage
2623
uses: magefile/mage-action@v3
@@ -32,17 +29,10 @@ jobs:
3229
sudo apt update
3330
sudo apt install -y gcc
3431
35-
- name: Setup CI Linter
36-
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin ${{env.GOLANGCI_LINT_VERSION}}
37-
3832
- name: Build
3933
run: |
4034
mage -v build
4135
42-
- name: Lint
43-
run: |
44-
mage -v lint
45-
4636
- name: Test
4737
run: |
4838
CGO_ENABLED=1 mage -v testRace

.github/workflows/go-lint.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: golangci-lint
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
lint-go:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-go@v5
17+
with:
18+
go-version-file: ./go.mod
19+
- name: golangci-lint
20+
uses: golangci/golangci-lint-action@v6
21+
with:
22+
version: v1.61.0
23+
args: |
24+
--config .golangci.toml --max-same-issues=0 --max-issues-per-linter=0 --verbose
25+
skip-cache: true
26+
install-mode: binary

0 commit comments

Comments
 (0)