-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (53 loc) · 1.21 KB
/
Copy pathci.yml
File metadata and controls
56 lines (53 loc) · 1.21 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: '1.25'
- name: Tidy modules
run: go mod tidy
- name: Check go mod tidy changes
run: |
if git diff --exit-code go.mod go.sum; then
echo "go.mod and go.sum are up to date"
else
echo "go.mod or go.sum changed after go mod tidy"
exit 1
fi
- name: Check formatting
run: |
if ! gofmt -d . | tee /dev/stderr | grep -q .; then
echo "Formatting is correct"
else
echo "Formatting issues found"
exit 1
fi
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: latest
- name: Vet
run: make lint
test-and-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: '1.25'
- name: Test
run: make test
- name: Test E2E
run: make test-e2e
- name: Build
run: make build