Debian Codegraph @

.github/workflows/golangci-lint.yml

raw
1 name: golangci-lint
2 on:
3 push:
4 tags:
5 - v*
6 branches:
7 - master
8 pull_request:
9 jobs:
10 golangci:
11 name: lint
12 runs-on: ubuntu-latest
13 steps:
14 - name: Checkout code
15 uses: actions/checkout@v4
16
17 - name: Setup golang
18 uses: actions/setup-go@v4
19 with:
20 go-version: '1.22'
21 cache: false # Handled by golangci-lint.
22
23 - name: Validate go mod
24 run: |
25 go mod tidy
26 git --no-pager diff && [[ 0 -eq $(git status --porcelain | wc -l) ]]
27
28 - name: golangci-lint
29 uses: golangci/golangci-lint-action@v4
30 with:
31 version: v1.56.2
32 args: --out-format=colored-line-number