File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : build
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ pull_request :
8
+ types : [opened, synchronize, reopened]
9
+
10
+ jobs :
11
+ check :
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - name : Checkout
15
+ uses : actions/checkout@v3
16
+ - uses : reviewdog/action-staticcheck@v1
17
+ with :
18
+ github_token : ${{ secrets.github_token }}
19
+ reporter : github-pr-review
20
+ filter_mode : nofilter
21
+ fail_on_error : true
22
+
23
+ build :
24
+ runs-on : ubuntu-latest
25
+ strategy :
26
+ fail-fast : false
27
+ matrix :
28
+ go : [1.16, 1.17, 1.18]
29
+ steps :
30
+ - name : Checkout
31
+ uses : actions/checkout@v3
32
+ - name : Setup Go
33
+ uses : actions/setup-go@v3
34
+ with :
35
+ go-version : " ${{ matrix.go }}"
36
+ - name : Check Go code formatting
37
+ run : |
38
+ if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then
39
+ gofmt -s -l .
40
+ echo "Please format Go code by running: go fmt ./..."
41
+ exit 1
42
+ fi
43
+ - name : Build
44
+ run : |
45
+ go vet ./...
46
+ go test -v ./...
47
+ go build ./...
You can’t perform that action at this time.
0 commit comments