Skip to content

Commit 4b51e68

Browse files
committed
Added extra lint jobs
1 parent 317c1d2 commit 4b51e68

File tree

1 file changed

+28
-5
lines changed

1 file changed

+28
-5
lines changed

.github/workflows/go.yml

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,17 @@ on:
66
pull_request:
77
branches: [ "main" ]
88

9-
jobs:
9+
permissions:
10+
contents: read
11+
pull-requests: read
12+
1013

14+
jobs:
1115
build:
1216
runs-on: ubuntu-latest
1317
steps:
14-
- uses: actions/checkout@v3
15-
16-
- name: Set up Go
17-
uses: actions/setup-go@v4
18+
- uses: actions/checkout@v4
19+
- uses: actions/setup-go@v5
1820
with:
1921
go-version: '1.21'
2022

@@ -23,3 +25,24 @@ jobs:
2325

2426
- name: Test
2527
run: go test -v ./...
28+
29+
30+
lint:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v4
34+
- uses: actions/setup-go@v5
35+
with:
36+
go-version: '1.21'
37+
cache: false
38+
- name: Run Gosec Security Scanner
39+
uses: securego/gosec@master
40+
with:
41+
args: ./..
42+
43+
- name: golangci-lint
44+
uses: golangci/golangci-lint-action@v4
45+
with:
46+
version: latest
47+
only-new-issues: true # on PR only show new issues
48+
skip-cache: true # avoid influencing caching that also hurts the build job

0 commit comments

Comments
 (0)