File tree Expand file tree Collapse file tree 2 files changed +52
-13
lines changed Expand file tree Collapse file tree 2 files changed +52
-13
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ name : Go CI Tests
3
+
4
+ on : # yamllint disable-line rule:truthy
5
+ push :
6
+ branches : ["main"]
7
+ pull_request :
8
+ # The branches below must be a subset of the branches above
9
+ branches : ["main"]
10
+ workflow_dispatch :
11
+
12
+ env :
13
+ LOG_LEVEL : WARN
14
+
15
+ jobs :
16
+ lint :
17
+ name : " Go CI LINT"
18
+ strategy :
19
+ fail-fast : false
20
+ matrix :
21
+ os : ["windows-2022", "ubuntu-24.04", "macos-14"]
22
+ go : ["1.22.x", "1.23.x", "1.24.x"]
23
+ runs-on : ${{ matrix.os }}
24
+ steps :
25
+ - uses : actions/checkout@v4
26
+
27
+ - name : Set up Go
28
+ uses : actions/setup-go@v5
29
+ with :
30
+ go-version : ${{ matrix.go }}
31
+ check-latest : false
32
+
33
+ - run : go version
34
+
35
+ - name : Test Styling (gofmt)
36
+ if : matrix.go >= '1.23'
37
+ run : gofmt -l . && echo '✔ Your code looks good.'
38
+
39
+ # yamllint disable rule:line-length
40
+ - name : Test Styling (analysis/modernize) Analyzer modernize
41
+ run : go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -test ./...
42
+ # yamllint enable rule:line-length
43
+
44
+ - name : Lint (go vet)
45
+ run : go vet -v ./...
46
+
47
+ - name : Lint golangci-lint
48
+ uses : golangci/golangci-lint-action@v8
49
+ with :
50
+ args : --timeout=10m
51
+ version : v2.1.0
52
+ skip-cache : true
Original file line number Diff line number Diff line change 35
35
- name : Build
36
36
run : go build -v ./...
37
37
38
- - name : Lint (gofmt)
39
- run : gofmt -l . && echo '✔ Your code looks good.'
40
-
41
- - name : Lint (go vet)
42
- run : go vet -v ./...
43
-
44
- - name : Lint golangci-lint
45
- uses : golangci/golangci-lint-action@v8
46
- with :
47
- args : --timeout=10m
48
- version : v2.1.0
49
- skip-cache : true
50
-
51
38
- name : Test
52
39
run : |
53
40
go test -v -coverprofile="coverage.out" ./exercises/...
You can’t perform that action at this time.
0 commit comments