1
- name : integration
1
+ name : client
2
+
3
+ env :
4
+ QUERYX_ENV : test
5
+
2
6
on :
3
7
push :
4
8
paths-ignore :
14
18
- name : Test
15
19
run : |
16
20
go test $(go list ./... | grep -Ev "generator|internal") -race -coverprofile=coverage.txt -covermode=atomic
17
- # - name: Upload coverage to Codecov
18
- # uses: codecov/codecov-action@v3
19
21
- name : Build
20
22
run : go build -o /usr/local/bin/queryx cmd/queryx/main.go
21
23
- uses : actions/upload-artifact@v4
44
46
--health-interval 10s
45
47
--health-timeout 5s
46
48
--health-retries 5
49
+ env :
50
+ DATABASE_URL : postgresql://postgres:postgres@localhost:5432/queryx_test?sslmode=disable
47
51
steps :
48
52
- uses : actions/checkout@v3
49
53
- uses : actions/download-artifact@v4
@@ -52,22 +56,19 @@ jobs:
52
56
path : /usr/local/bin
53
57
- run : chmod a+x /usr/local/bin/queryx
54
58
- name : generate
55
- env :
56
- QUERYX_ENV : test
57
- DATABASE_URL : postgresql://postgres:postgres@localhost:5432/queryx_test?sslmode=disable
58
59
run : |
59
- cd internal/integration
60
+ cd internal/integration/client
60
61
queryx db:migrate --schema postgresql.hcl
61
62
queryx db:migrate --schema postgresql.hcl
62
63
queryx generate --schema postgresql.hcl
63
64
- name : golangci-lint
64
65
uses : golangci/golangci-lint-action@v3
65
66
with :
66
67
args : --timeout=3m
67
- working-directory : internal/integration/db
68
+ working-directory : internal/integration/client/ db
68
69
- name : go test
69
70
run : |
70
- cd internal/integration
71
+ cd internal/integration/client
71
72
go test -v ./...
72
73
postgresql-typescript :
73
74
needs : [build]
86
87
--health-interval 10s
87
88
--health-timeout 5s
88
89
--health-retries 5
90
+ env :
91
+ DATABASE_URL : postgresql://postgres:postgres@localhost:5432/queryx_test?sslmode=disable
89
92
steps :
90
93
- uses : actions/checkout@v3
91
94
- uses : actions/download-artifact@v4
@@ -94,25 +97,18 @@ jobs:
94
97
path : /usr/local/bin
95
98
- run : chmod a+x /usr/local/bin/queryx
96
99
- name : generate
97
- env :
98
- QUERYX_ENV : test
99
- DATABASE_URL : postgresql://postgres:postgres@localhost:5432/queryx_test?sslmode=disable
100
100
run : |
101
- cd internal/integration
101
+ cd internal/integration/client
102
102
queryx db:migrate --schema postgresql.hcl
103
103
queryx generate --schema postgresql.hcl
104
104
- name : yarn install
105
105
run : |
106
- cd internal/integration
106
+ cd internal/integration/client
107
107
yarn install
108
108
- name : yarn test
109
109
run : |
110
- cd internal/integration
111
- yarn test
112
- # - name: yarn tsc
113
- # run: |
114
- # cd internal/integration
115
- # yarn tsc
110
+ cd internal/integration/client
111
+ yarn vitest run --dir client
116
112
mysql-golang :
117
113
needs : [build]
118
114
runs-on : ubuntu-latest
@@ -130,6 +126,8 @@ jobs:
130
126
--health-start-period 10s
131
127
--health-timeout 5s
132
128
--health-retries 10
129
+ env :
130
+ DATABASE_URL : mysql://root:@localhost:3306/queryx_test
133
131
steps :
134
132
- uses : actions/checkout@v3
135
133
- uses : actions/download-artifact@v4
@@ -138,22 +136,19 @@ jobs:
138
136
path : /usr/local/bin
139
137
- run : chmod a+x /usr/local/bin/queryx
140
138
- name : generate
141
- env :
142
- QUERYX_ENV : test
143
- DATABASE_URL : mysql://root:@localhost:3306/queryx_test
144
139
run : |
145
- cd internal/integration
140
+ cd internal/integration/client
146
141
queryx db:migrate --schema mysql.hcl
147
142
queryx db:migrate --schema mysql.hcl
148
143
queryx generate --schema mysql.hcl
149
144
- name : golangci-lint
150
145
uses : golangci/golangci-lint-action@v3
151
146
with :
152
147
args : --timeout=3m
153
- working-directory : internal/integration/db
148
+ working-directory : internal/integration/client/ db
154
149
- name : go test
155
150
run : |
156
- cd internal/integration
151
+ cd internal/integration/client
157
152
go test -v ./...
158
153
mysql-typescript :
159
154
needs : [build]
@@ -172,6 +167,8 @@ jobs:
172
167
--health-start-period 10s
173
168
--health-timeout 5s
174
169
--health-retries 10
170
+ env :
171
+ DATABASE_URL : mysql://root:@localhost:3306/queryx_test
175
172
steps :
176
173
- uses : actions/checkout@v3
177
174
- uses : actions/download-artifact@v4
@@ -180,28 +177,23 @@ jobs:
180
177
path : /usr/local/bin
181
178
- run : chmod a+x /usr/local/bin/queryx
182
179
- name : generate
183
- env :
184
- QUERYX_ENV : test
185
- DATABASE_URL : mysql://root:@localhost:3306/queryx_test
186
180
run : |
187
- cd internal/integration
181
+ cd internal/integration/client
188
182
queryx db:migrate --schema mysql.hcl
189
183
queryx generate --schema mysql.hcl
190
184
- name : yarn install
191
185
run : |
192
- cd internal/integration
186
+ cd internal/integration/client
193
187
yarn install
194
188
- name : yarn test
195
189
run : |
196
- cd internal/integration
197
- yarn test
198
- # - name: yarn tsc
199
- # run: |
200
- # cd internal/integration
201
- # yarn tsc
190
+ cd internal/integration/client
191
+ yarn vitest run --dir client
202
192
sqlite-golang :
203
193
needs : [build]
204
194
runs-on : ubuntu-latest
195
+ env :
196
+ DATABASE_URL : sqlite:test.sqlite3
205
197
steps :
206
198
- uses : actions/checkout@v3
207
199
- uses : actions/download-artifact@v4
@@ -210,26 +202,25 @@ jobs:
210
202
path : /usr/local/bin
211
203
- run : chmod a+x /usr/local/bin/queryx
212
204
- name : generate
213
- env :
214
- QUERYX_ENV : test
215
- DATABASE_URL : sqlite:test.sqlite3
216
205
run : |
217
- cd internal/integration
206
+ cd internal/integration/client
218
207
queryx db:migrate --schema sqlite.hcl
219
208
queryx db:migrate --schema sqlite.hcl
220
209
queryx generate --schema sqlite.hcl
221
210
- name : golangci-lint
222
211
uses : golangci/golangci-lint-action@v3
223
212
with :
224
213
args : --timeout=3m
225
- working-directory : internal/integration/db
214
+ working-directory : internal/integration/client/ db
226
215
- name : go test
227
216
run : |
228
- cd internal/integration
217
+ cd internal/integration/client
229
218
go test -v ./...
230
219
sqlite-typescript :
231
220
needs : [build]
232
221
runs-on : ubuntu-latest
222
+ env :
223
+ DATABASE_URL : sqlite:test.sqlite3
233
224
steps :
234
225
- uses : actions/checkout@v3
235
226
- uses : actions/download-artifact@v4
@@ -238,22 +229,17 @@ jobs:
238
229
path : /usr/local/bin
239
230
- run : chmod a+x /usr/local/bin/queryx
240
231
- name : generate
241
- env :
242
- QUERYX_ENV : test
243
- DATABASE_URL : sqlite:test.sqlite3
244
232
run : |
245
- cd internal/integration
233
+ cd internal/integration/client
246
234
queryx db:migrate --schema sqlite.hcl
247
235
queryx generate --schema sqlite.hcl
248
236
- name : yarn install
249
237
run : |
250
- cd internal/integration
238
+ cd internal/integration/client
251
239
yarn install
252
240
- name : yarn test
241
+ env :
242
+ DATABASE_URL : sqlite:client/test.sqlite3
253
243
run : |
254
- cd internal/integration
255
- yarn test
256
- # - name: yarn tsc
257
- # run: |
258
- # cd internal/integration
259
- # yarn tsc
244
+ cd internal/integration/client
245
+ yarn vitest run --dir client
0 commit comments