19
19
- ' _fixture/**'
20
20
- ' .github/**'
21
21
- ' codecov.yml'
22
+ workflow_dispatch :
22
23
23
24
jobs :
24
25
test :
@@ -27,41 +28,30 @@ jobs:
27
28
os : [ubuntu-latest, macos-latest, windows-latest]
28
29
# Each major Go release is supported until there are two newer major releases. https://golang.org/doc/devel/release.html#policy
29
30
# Echo tests with last four major releases
30
- go : [1.14 , 1.15 , 1.16, 1.17 ]
31
+ go : [1.16 , 1.17 , 1.18 ]
31
32
name : ${{ matrix.os }} @ Go ${{ matrix.go }}
32
33
runs-on : ${{ matrix.os }}
33
34
steps :
34
- - name : Set up Go ${{ matrix.go }}
35
- uses : actions/setup-go@v1
36
- with :
37
- go-version : ${{ matrix.go }}
38
-
39
- - name : Set GOPATH and PATH
40
- run : |
41
- echo "GOPATH=$(dirname $GITHUB_WORKSPACE)" >> $GITHUB_ENV
42
- echo "$(dirname $GITHUB_WORKSPACE)/bin" >> $GITHUB_PATH
43
- shell : bash
44
-
45
- - name : Set build variables
46
- run : |
47
- echo "GOPROXY=https://proxy.golang.org" >> $GITHUB_ENV
48
- echo "GO111MODULE=on" >> $GITHUB_ENV
49
-
50
35
- name : Checkout Code
51
- uses : actions/checkout@v1
36
+ uses : actions/checkout@v3
52
37
with :
53
38
ref : ${{ github.ref }}
54
39
40
+ - name : Set up Go ${{ matrix.go }}
41
+ uses : actions/setup-go@v3
42
+ with :
43
+ go-version : ${{ matrix.go }}
44
+
55
45
- name : Install Dependencies
56
- run : go get -v golang.org/x/lint/golint
46
+ run : go install golang.org/x/lint/golint@latest
57
47
58
48
- name : Run Tests
59
49
run : |
60
50
golint -set_exit_status ./...
61
51
go test -race --coverprofile=coverage.coverprofile --covermode=atomic ./...
62
52
63
53
- name : Upload coverage to Codecov
64
- if : success() && matrix.go == 1.17 && matrix.os == 'ubuntu-latest'
54
+ if : success() && matrix.go == 1.18 && matrix.os == 'ubuntu-latest'
65
55
uses : codecov/codecov-action@v1
66
56
with :
67
57
token :
@@ -71,39 +61,28 @@ jobs:
71
61
strategy :
72
62
matrix :
73
63
os : [ubuntu-latest]
74
- go : [1.17 ]
64
+ go : [1.18 ]
75
65
name : Benchmark comparison ${{ matrix.os }} @ Go ${{ matrix.go }}
76
66
runs-on : ${{ matrix.os }}
77
67
steps :
78
- - name : Set up Go ${{ matrix.go }}
79
- uses : actions/setup-go@v1
80
- with :
81
- go-version : ${{ matrix.go }}
82
-
83
- - name : Set GOPATH and PATH
84
- run : |
85
- echo "GOPATH=$(dirname $GITHUB_WORKSPACE)" >> $GITHUB_ENV
86
- echo "$(dirname $GITHUB_WORKSPACE)/bin" >> $GITHUB_PATH
87
- shell : bash
88
-
89
- - name : Set build variables
90
- run : |
91
- echo "GOPROXY=https://proxy.golang.org" >> $GITHUB_ENV
92
- echo "GO111MODULE=on" >> $GITHUB_ENV
93
-
94
68
- name : Checkout Code (Previous)
95
- uses : actions/checkout@v2
69
+ uses : actions/checkout@v3
96
70
with :
97
71
ref : ${{ github.base_ref }}
98
72
path : previous
99
73
100
74
- name : Checkout Code (New)
101
- uses : actions/checkout@v2
75
+ uses : actions/checkout@v3
102
76
with :
103
77
path : new
104
78
79
+ - name : Set up Go ${{ matrix.go }}
80
+ uses : actions/setup-go@v3
81
+ with :
82
+ go-version : ${{ matrix.go }}
83
+
105
84
- name : Install Dependencies
106
- run : go get -v golang.org/x/perf/cmd/benchstat
85
+ run : go install golang.org/x/perf/cmd/benchstat@latest
107
86
108
87
- name : Run Benchmark (Previous)
109
88
run : |
0 commit comments