File tree Expand file tree Collapse file tree 1 file changed +60
-0
lines changed Expand file tree Collapse file tree 1 file changed +60
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : run-build
2
+ on :
3
+ push :
4
+ branches :
5
+ - master
6
+ - dev
7
+ pull_request :
8
+ branches :
9
+ - master
10
+
11
+ jobs :
12
+ linters :
13
+ # go vet and go fmt are mandatory.
14
+ # Other linters are optional but should dispay issues.
15
+ name : Linters
16
+ runs-on : ubuntu-latest
17
+ steps :
18
+ - uses : actions/checkout@v2
19
+ - name : Setup go 1.16
20
+ uses : actions/setup-go@v2
21
+ with :
22
+ go-version : ' 1.16'
23
+ - name : Run go vet
24
+ run : go vet ./...
25
+ - name : Run gofmt
26
+ run : |
27
+ gofmt -s -l .
28
+ if [ "$(gofmt -l . | wc -l)" -gt 0 ]; then exit 1; fi
29
+ - name : Run golint
30
+ run : |
31
+ go get golang.org/x/lint/golint
32
+ golint ./...
33
+ continue-on-error : true
34
+ - name : Run staticcheck
35
+ run : |
36
+ go get honnef.co/go/tools/cmd/staticcheck
37
+ staticcheck ./...
38
+ continue-on-error : true
39
+ - name : Run errcheck
40
+ run : |
41
+ go get github.com/kisielk/errcheck
42
+ errcheck ./...
43
+ continue-on-error : true
44
+
45
+ build :
46
+ name : build
47
+ strategy :
48
+ matrix :
49
+ go-version : [1.14.x, 1.15.x, 1.16.x]
50
+ platform : [ubuntu-latest]
51
+ runs-on : ${{ matrix.platform }}
52
+ steps :
53
+ - name : Install Go
54
+ uses : actions/setup-go@v1
55
+ with :
56
+ go-version : ${{ matrix.go-version }}
57
+ - name : Checkout code
58
+ uses : actions/checkout@v2
59
+ - name : Run unit tests
60
+ run : go build ./cmd/ginvalid
You can’t perform that action at this time.
0 commit comments