-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (54 loc) · 1.25 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
56
57
58
59
60
61
62
name: lint
on:
push:
branches: [ master ]
paths:
- '.github/workflows/lint.yml'
- '.golangci.yml'
- '**.go'
- 'go.*'
pull_request:
branches: [ master ]
paths:
- '.github/workflows/lint.yml'
- '.golangci.yml'
- '**.go'
- 'go.*'
permissions:
contents: read
jobs:
lint:
name: golang
runs-on: ubuntu-24.04
continue-on-error: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21"
- name: Install dependencies
run: |
sudo apt-get -y update
sudo apt-get -y install libheif-dev
- name: lint
uses: golangci/[email protected]
with:
version: latest
args: --timeout=2m0s
skip-cache: true
dependencies:
name: dependencies
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "stable"
- name: Check minimum supported version of Go
run: |
go mod tidy -go=1.21 -compat=1.21
- name: Check go.mod / go.sum
run: |
git add go.*
git diff --cached --exit-code go.*