16
16
# - macOS-latest
17
17
# - windows-latest
18
18
go :
19
- - " 1.19.1"
19
+ - " 1.19.10"
20
+ - " 1.20.5"
21
+ - " 1.21.0-rc.2"
20
22
services :
21
23
postgres :
22
24
image : postgres:12
@@ -31,19 +33,21 @@ jobs:
31
33
run : |
32
34
psql -U postgres -h localhost -d postgres -c 'CREATE USER dgw_test;'
33
35
psql -U postgres -h localhost -d postgres -c 'CREATE DATABASE dgw_test OWNER dgw_test;'
36
+ - name : Checkout code
37
+ uses : actions/checkout/@v3
34
38
- name : Install Go
35
- uses : actions/setup-go/@v2
39
+ uses : actions/setup-go/@v4
36
40
with :
37
41
go-version : ${{ matrix.go }}
38
-
39
- - name : Checkout code
40
- uses : actions/checkout/@v3
41
-
42
+ - name : Download Go modules
43
+ shell : bash
44
+ if : ${{ steps.setup-go.outputs.cache-hit != 'true' }}
45
+ run : go mod download
42
46
- name : Lint
43
47
uses : golangci/golangci-lint-action@v3
44
-
45
48
- name : Run test
46
49
run : go test -v
50
+
47
51
check-test-gen :
48
52
runs-on : ${{ matrix.os }}
49
53
strategy :
55
59
# - macOS-latest
56
60
# - windows-latest
57
61
go :
58
- - " 1.19.1"
62
+ - " 1.19.10"
63
+ - " 1.20.5"
59
64
services :
60
65
postgres :
61
66
image : postgres:12
@@ -70,17 +75,20 @@ jobs:
70
75
run : |
71
76
psql -U postgres -h localhost -d postgres -c 'CREATE USER dgw_test;'
72
77
psql -U postgres -h localhost -d postgres -c 'CREATE DATABASE dgw_test OWNER dgw_test;'
78
+ - name : Checkout code
79
+ uses : actions/checkout/@v3
73
80
- name : Install Go
74
- uses : actions/setup-go/@v2
81
+ uses : actions/setup-go/@v4
75
82
with :
76
83
go-version : ${{ matrix.go }}
77
-
78
- - name : Checkout code
79
- uses : actions/checkout/@v3
80
-
81
- - name : Lint
82
- uses : golangci/golangci-lint-action@v3
83
-
84
+ - name : Download Go modules
85
+ shell : bash
86
+ if : ${{ steps.setup-go.outputs.cache-hit != 'true' }}
87
+ run : go mod download
88
+ - name : Install deps
89
+ run : |
90
+ go install golang.org/x/tools/cmd/goimports@latest
91
+ go install
84
92
- name : Generate
85
93
run : go generate -v ./example
86
94
- name : Check diff
0 commit comments