-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (38 loc) · 976 Bytes
/
gopls.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
name: Go Lint and Format with gopls
on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev
jobs:
gopls:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.22' # specify your Go version here
- name: Install gopls
run: go install golang.org/x/tools/gopls@latest
- name: Run gopls checks
run: |
gopls check ./operator/...
gopls check ./resolver/...
- name: Verify gofmt
run: |
if [ -n "$(gofmt -l .)" ]; then
echo "The following files are not formatted:"
gofmt -l .
exit 1
fi
- name: Verify golint
run: |
go install golang.org/x/lint/golint@latest
golint check ./operator/...
golint check ./resolver/...