-
Notifications
You must be signed in to change notification settings - Fork 14
55 lines (45 loc) · 1.22 KB
/
lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Lint
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.21
- name: Caching
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: go-${{ hashFiles('**/go.sum') }}
restore-keys: go-
- name: Dependencies
run: go mod vendor
- name: Checksum
run: go mod verify
- name: Codestyle
uses: golangci/golangci-lint-action@v2
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: latest
# Optional: working directory, useful for monorepos
working-directory: ./
# Optional: golangci-lint command line arguments.
args: --timeout 200s --build-tags=musl
- name: Golang Vulncheck
uses: Templum/[email protected]
with:
go-version: latest
vulncheck-version: latest
fail-on-vuln: true
package: ./...