Skip to content

Commit 4b303ed

Browse files
committed
Add golangci-lint-action
Let's use the recommended github action instead of run it from a job Signed-off-by: German Maglione <[email protected]>
1 parent e3e6528 commit 4b303ed

File tree

3 files changed

+37
-1
lines changed

3 files changed

+37
-1
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
make integration_tests
2525
- name: lint
2626
run: |
27-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.58.2
27+
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.61.0
2828
export PATH=$PATH:$HOME/go/bin
2929
make lint
3030
- name: gofmt
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: golangci-lint
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
7+
8+
permissions:
9+
# Required: allow read access to the content for analysis.
10+
contents: read
11+
# Optional: allow read access to pull request. Use with `only-new-issues` option.
12+
pull-requests: read
13+
# Optional: allow write access to checks to allow the action to annotate code in the PR.
14+
checks: write
15+
16+
jobs:
17+
golangci:
18+
# strategy:
19+
# matrix:
20+
# go: [stable]
21+
# os: [ubuntu-latest, macos-latest]
22+
name: lint
23+
# runs-on: ${{ matrix.os }}
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v4
27+
- uses: actions/setup-go@v5
28+
with:
29+
go-version: ${{ matrix.go }}
30+
- name: golangci-lint
31+
uses: golangci/golangci-lint-action@v6
32+
with:
33+
version: v1.60

.golangci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
run:
2+
modules-download-mode: vendor
3+

0 commit comments

Comments
 (0)