File tree Expand file tree Collapse file tree 1 file changed +24
-6
lines changed Expand file tree Collapse file tree 1 file changed +24
-6
lines changed Original file line number Diff line number Diff line change 8
8
branches : [ main ]
9
9
push :
10
10
branches : [ main ]
11
-
11
+
12
+ env :
13
+ GO_VERSION : ' 1.24'
12
14
13
15
jobs :
14
- build :
16
+ lint :
17
+ name : Lint
15
18
runs-on : ubuntu-latest
16
19
steps :
17
20
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
18
21
19
22
- name : Set up Go
20
23
uses : actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b
21
24
with :
22
- go-version : ' 1.24 ' # You can change this to your desired Go version
25
+ go-version : ${{ env.GO_VERSION }}
23
26
24
27
- name : Install golangci-lint
25
28
uses : golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9
26
29
with :
27
30
version : latest
28
31
29
- - name : Build
30
- run : go build -v ./...
31
-
32
32
- name : Lint
33
33
run : golangci-lint run
34
34
40
40
exit 1
41
41
fi
42
42
43
+ build-and-test :
44
+ name : Build and Test
45
+ needs : lint
46
+ runs-on : ${{ matrix.os }}
47
+ strategy :
48
+ matrix :
49
+ os : [ubuntu-latest, macos-latest, windows-latest]
50
+ steps :
51
+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
52
+
53
+ - name : Set up Go
54
+ uses : actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b
55
+ with :
56
+ go-version : ${{ env.GO_VERSION }}
57
+
58
+ - name : Build
59
+ run : go build -v ./...
60
+
43
61
- name : Test
44
62
run : go test -v ./...
You can’t perform that action at this time.
0 commit comments