File tree Expand file tree Collapse file tree 1 file changed +85
-0
lines changed Expand file tree Collapse file tree 1 file changed +85
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : CI
2
+
3
+ on :
4
+ push :
5
+ branches : [ master ]
6
+ pull_request :
7
+ branches : [ master ]
8
+
9
+ jobs :
10
+ test :
11
+ name : Test
12
+ runs-on : ubuntu-latest
13
+
14
+ strategy :
15
+ matrix :
16
+ go-version : ['1.25']
17
+
18
+ steps :
19
+ - name : Checkout code
20
+ uses : actions/checkout@v4
21
+
22
+ - name : Set up Go
23
+ uses : actions/setup-go@v5
24
+ with :
25
+ go-version : ${{ matrix.go-version }}
26
+
27
+ - name : Cache Go modules
28
+ uses : actions/cache@v4
29
+ with :
30
+ path : |
31
+ ~/.cache/go-build
32
+ ~/go/pkg/mod
33
+ key : ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
34
+ restore-keys : |
35
+ ${{ runner.os }}-go-${{ matrix.go-version }}-
36
+
37
+ - name : Download dependencies
38
+ run : go mod download
39
+
40
+ - name : Verify dependencies
41
+ run : go mod verify
42
+
43
+ - name : Run tests
44
+ run : make test
45
+
46
+ - name : Run fmt check
47
+ run : |
48
+ if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then
49
+ echo "The following files are not formatted:"
50
+ gofmt -s -l .
51
+ exit 1
52
+ fi
53
+
54
+ build :
55
+ name : Build
56
+ runs-on : ubuntu-latest
57
+
58
+ strategy :
59
+ matrix :
60
+ go-version : ['1.25']
61
+
62
+ steps :
63
+ - name : Checkout code
64
+ uses : actions/checkout@v4
65
+
66
+ - name : Set up Go
67
+ uses : actions/setup-go@v5
68
+ with :
69
+ go-version : ${{ matrix.go-version }}
70
+
71
+ - name : Cache Go modules
72
+ uses : actions/cache@v4
73
+ with :
74
+ path : |
75
+ ~/.cache/go-build
76
+ ~/go/pkg/mod
77
+ key : ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
78
+ restore-keys : |
79
+ ${{ runner.os }}-go-${{ matrix.go-version }}-
80
+
81
+ - name : Download dependencies
82
+ run : go mod download
83
+
84
+ - name : Build
85
+ run : make build
You can’t perform that action at this time.
0 commit comments