File tree Expand file tree Collapse file tree 3 files changed +50
-0
lines changed Expand file tree Collapse file tree 3 files changed +50
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Format
2
+ on : [push, pull_request]
3
+ jobs :
4
+ format :
5
+ runs-on : ubuntu-latest
6
+ steps :
7
+ - uses : actions/checkout@v3
8
+ - uses : actions/setup-go@v3
9
+ with :
10
+ go-version : " 1.19"
11
+ - run : if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi
Original file line number Diff line number Diff line change
1
+ name : Lint
2
+ on : [push, pull_request]
3
+ jobs :
4
+ lint :
5
+ runs-on : ubuntu-latest
6
+ container : golang:1.19-bullseye
7
+ steps :
8
+ - uses : actions/checkout@v3
9
+ - uses : actions/setup-go@v3
10
+ with :
11
+ go-version : " 1.19"
12
+ -
run :
" go install honnef.co/go/tools/cmd/[email protected] "
13
+ - run : " staticcheck ./..."
Original file line number Diff line number Diff line change
1
+ name : Tests
2
+
3
+ on : [push, pull_request]
4
+
5
+ jobs :
6
+ test :
7
+ strategy :
8
+ fail-fast : false
9
+ matrix :
10
+ os : [windows-latest, ubuntu-latest]
11
+ go : [1.19.x, 1.20.x]
12
+
13
+ runs-on : ${{ matrix.os }}
14
+
15
+ steps :
16
+ - uses : actions/checkout@v3
17
+
18
+ - uses : actions/setup-go@v3
19
+ with :
20
+ go-version : ${{ matrix.go }}
21
+
22
+ - run : go test ./...
23
+ if : matrix.os == 'windows-latest'
24
+
25
+ - run : go test --race ./...
26
+ if : matrix.os == 'ubuntu-latest'
You can’t perform that action at this time.
0 commit comments