@@ -28,59 +28,68 @@ jobs:
28
28
29
29
test :
30
30
runs-on : ubuntu-latest
31
+ strategy :
32
+ matrix :
33
+ goversion : ["1.15", "1.16", "1.17", "1.18", "1.19", "1.20", "1.21"]
31
34
steps :
32
- - name : Install Go
33
- if : success()
34
- uses : actions/setup-go@v4
35
- with :
36
- go-version : 1.20.x
37
- - name : Checkout code
38
- uses : actions/checkout@v3
39
- - name : Run tests
40
- run : make test
41
- - name : Convert coverage to lcov
42
- uses :
jandelgado/[email protected]
43
- with :
44
- infile : coverage.out
45
- outfile : coverage.lcov
46
- - name : Coveralls
47
- uses :
coverallsapp/[email protected]
48
- with :
49
- github-token : ${{ secrets.github_token }}
50
- path-to-lcov : coverage.lcov
35
+ - name : Install Go
36
+ if : success()
37
+ uses : actions/setup-go@v4
38
+ with :
39
+ go-version : ${{ matrix.goversion }}
40
+ - name : Checkout code
41
+ uses : actions/checkout@v3
42
+ - name : Run tests
43
+ run : |
44
+ go version
45
+ make test
51
46
52
- build :
47
+ inttest :
53
48
runs-on : ubuntu-latest
54
- needs : [lint, test]
49
+ strategy :
50
+ matrix :
51
+ buildversion : ["1.15", "1.16", "1.17", "1.18", "1.19", "1.20", "1.21"]
52
+ testversion : ["1.15", "1.16", "1.17", "1.18", "1.19", "1.20", "1.21"]
55
53
steps :
56
- - name : Install Go
57
- uses : actions/setup-go@v4
58
- with :
59
- go-version : 1.20.x
60
- - name : Checkout code
61
- uses : actions/checkout@v3
62
- - name : build
63
- run : |
64
- export GO111MODULE=on
65
- make build
66
- - name : upload artifacts
67
- uses : actions/upload-artifact@master
68
- with :
69
- name : bin
70
- path : bin/
54
+ - name : Install Go
55
+ if : success()
56
+ uses : actions/setup-go@v4
57
+ with :
58
+ go-version : ${{ matrix.buildversion }}
59
+ - name : Checkout code
60
+ uses : actions/checkout@v3
61
+ - name : Build binary for inttest
62
+ run : |
63
+ go version
64
+ GO111MODULE=on make build-linux
65
+ - name : Install Go
66
+ if : success()
67
+ uses : actions/setup-go@v4
68
+ with :
69
+ go-version : ${{ matrix.testversion }}
70
+ - name : Integration test
71
+ run : |
72
+ go version
73
+ make inttest
71
74
72
- inttest :
73
- name : End-to-end integration test
74
- needs : build
75
+ build :
75
76
runs-on : ubuntu-latest
77
+ needs : [lint, test, inttest]
76
78
steps :
77
- - name : Checkout code
78
- uses : actions/checkout@v2
79
- - name : Download binaries from build stage
80
- uses : actions/download-artifact@v1
81
- with :
82
- name : bin
83
- - name : Run test
84
- run : |
85
- chmod 755 bin/*
86
- make inttest
79
+ - name : Checkout code
80
+ uses : actions/checkout@v3
81
+ - name : Install Go
82
+ uses : actions/setup-go@v4
83
+ with :
84
+ go-version : 1.21
85
+ - name : build
86
+ run : |
87
+ go version
88
+ make build-linux
89
+ make build-windows
90
+ make build-darwin
91
+ - name : upload artifacts
92
+ uses : actions/upload-artifact@master
93
+ with :
94
+ name : bin
95
+ path : bin/
0 commit comments