-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (36 loc) · 1.12 KB
/
lint_golang.yml
File metadata and controls
38 lines (36 loc) · 1.12 KB
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
name: Lint
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
jobs:
golangci:
name: Lint with GolangCI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
id: go
with:
go-version-file: go.mod
# We use a manually configured cache key to avoid conflicts with the test action cache
# See https://github.com/actions/setup-go/issues/358
cache: false
- uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{runner.os}}-go-${{steps.go.outputs.go-version}}-lint-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{runner.os}}-go-${{steps.go.outputs.go-version}}-lint
- name: golangci-lint
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9
with:
version: v2.11.4
args: --verbose