1
- on : [push, pull_request]
1
+ on :
2
+ push :
3
+ branches :
4
+ - master
5
+ pull_request :
6
+ branches :
7
+ - master
8
+
2
9
name : test and build
3
10
jobs :
4
11
lint :
5
12
runs-on : ubuntu-latest
6
13
steps :
7
14
- name : Install Go
8
- uses : actions/setup-go@v1
15
+ uses : actions/setup-go@v2-beta
9
16
with :
10
17
go-version : 1.15.x
11
18
- name : Checkout code
12
- uses : actions/checkout@v1
19
+ uses : actions/checkout@v2
13
20
- name : Install golangci-lint
14
21
run : |
15
22
go get github.com/golangci/golangci-lint/cmd/golangci-lint
@@ -27,11 +34,11 @@ jobs:
27
34
steps :
28
35
- name : Install Go
29
36
if : success()
30
- uses : actions/setup-go@v1
37
+ uses : actions/setup-go@v2-beta
31
38
with :
32
39
go-version : ${{ matrix.go-version }}
33
40
- name : Checkout code
34
- uses : actions/checkout@v1
41
+ uses : actions/checkout@v2
35
42
- name : Run tests
36
43
run : go test -v -covermode=count
37
44
@@ -40,17 +47,17 @@ jobs:
40
47
steps :
41
48
- name : Install Go
42
49
if : success()
43
- uses : actions/setup-go@v1
50
+ uses : actions/setup-go@v2-beta
44
51
with :
45
52
go-version : 1.15.x
46
53
- name : Checkout code
47
- uses : actions/checkout@v1
54
+ uses : actions/checkout@v2
48
55
- name : Calc coverage
49
56
run : |
50
57
export PATH=$PATH:$(go env GOPATH)/bin
51
58
go test -v -covermode=count -coverprofile=coverage.out
52
59
- name : Convert coverage to lcov
53
- uses :
jandelgado/[email protected] .4
60
+ uses :
jandelgado/[email protected] .5
54
61
with :
55
62
infile : coverage.out
56
63
outfile : coverage.lcov
@@ -65,11 +72,11 @@ jobs:
65
72
needs : [lint, test]
66
73
steps :
67
74
- name : Install Go
68
- uses : actions/setup-go@v1
75
+ uses : actions/setup-go@v2-beta
69
76
with :
70
77
go-version : 1.15.x
71
78
- name : Checkout code
72
- uses : actions/checkout@v1
79
+ uses : actions/checkout@v2
73
80
- name : build
74
81
run : |
75
82
export GO111MODULE=on
0 commit comments