@@ -28,59 +28,68 @@ jobs:
2828
2929 test :
3030 runs-on : ubuntu-latest
31+ strategy :
32+ matrix :
33+ goversion : ["1.15", "1.16", "1.17", "1.18", "1.19", "1.20", "1.21"]
3134 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/gcov2lcov-action@v1.0.2
43- with :
44- infile : coverage.out
45- outfile : coverage.lcov
46- - name : Coveralls
47- uses : coverallsapp/github-action@v1.0.1
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
5146
52- build :
47+ inttest :
5348 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"]
5553 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
7174
72- inttest :
73- name : End-to-end integration test
74- needs : build
75+ build :
7576 runs-on : ubuntu-latest
77+ needs : [lint, test, inttest]
7678 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