1- name : integration
1+ name : client
2+
3+ env :
4+ QUERYX_ENV : test
5+
26on :
37 push :
48 paths-ignore :
1418 - name : Test
1519 run : |
1620 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
1921 - name : Build
2022 run : go build -o /usr/local/bin/queryx cmd/queryx/main.go
2123 - uses : actions/upload-artifact@v4
4446 --health-interval 10s
4547 --health-timeout 5s
4648 --health-retries 5
49+ env :
50+ DATABASE_URL : postgresql://postgres:postgres@localhost:5432/queryx_test?sslmode=disable
4751 steps :
4852 - uses : actions/checkout@v3
4953 - uses : actions/download-artifact@v4
@@ -52,22 +56,19 @@ jobs:
5256 path : /usr/local/bin
5357 - run : chmod a+x /usr/local/bin/queryx
5458 - name : generate
55- env :
56- QUERYX_ENV : test
57- DATABASE_URL : postgresql://postgres:postgres@localhost:5432/queryx_test?sslmode=disable
5859 run : |
59- cd internal/integration
60+ cd internal/integration/client
6061 queryx db:migrate --schema postgresql.hcl
6162 queryx db:migrate --schema postgresql.hcl
6263 queryx generate --schema postgresql.hcl
6364 - name : golangci-lint
6465 uses : golangci/golangci-lint-action@v3
6566 with :
6667 args : --timeout=3m
67- working-directory : internal/integration/db
68+ working-directory : internal/integration/client/ db
6869 - name : go test
6970 run : |
70- cd internal/integration
71+ cd internal/integration/client
7172 go test -v ./...
7273 postgresql-typescript :
7374 needs : [build]
8687 --health-interval 10s
8788 --health-timeout 5s
8889 --health-retries 5
90+ env :
91+ DATABASE_URL : postgresql://postgres:postgres@localhost:5432/queryx_test?sslmode=disable
8992 steps :
9093 - uses : actions/checkout@v3
9194 - uses : actions/download-artifact@v4
@@ -94,25 +97,18 @@ jobs:
9497 path : /usr/local/bin
9598 - run : chmod a+x /usr/local/bin/queryx
9699 - name : generate
97- env :
98- QUERYX_ENV : test
99- DATABASE_URL : postgresql://postgres:postgres@localhost:5432/queryx_test?sslmode=disable
100100 run : |
101- cd internal/integration
101+ cd internal/integration/client
102102 queryx db:migrate --schema postgresql.hcl
103103 queryx generate --schema postgresql.hcl
104104 - name : yarn install
105105 run : |
106- cd internal/integration
106+ cd internal/integration/client
107107 yarn install
108108 - name : yarn test
109109 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
116112 mysql-golang :
117113 needs : [build]
118114 runs-on : ubuntu-latest
@@ -130,6 +126,8 @@ jobs:
130126 --health-start-period 10s
131127 --health-timeout 5s
132128 --health-retries 10
129+ env :
130+ DATABASE_URL : mysql://root:@localhost:3306/queryx_test
133131 steps :
134132 - uses : actions/checkout@v3
135133 - uses : actions/download-artifact@v4
@@ -138,22 +136,19 @@ jobs:
138136 path : /usr/local/bin
139137 - run : chmod a+x /usr/local/bin/queryx
140138 - name : generate
141- env :
142- QUERYX_ENV : test
143- DATABASE_URL : mysql://root:@localhost:3306/queryx_test
144139 run : |
145- cd internal/integration
140+ cd internal/integration/client
146141 queryx db:migrate --schema mysql.hcl
147142 queryx db:migrate --schema mysql.hcl
148143 queryx generate --schema mysql.hcl
149144 - name : golangci-lint
150145 uses : golangci/golangci-lint-action@v3
151146 with :
152147 args : --timeout=3m
153- working-directory : internal/integration/db
148+ working-directory : internal/integration/client/ db
154149 - name : go test
155150 run : |
156- cd internal/integration
151+ cd internal/integration/client
157152 go test -v ./...
158153 mysql-typescript :
159154 needs : [build]
@@ -172,6 +167,8 @@ jobs:
172167 --health-start-period 10s
173168 --health-timeout 5s
174169 --health-retries 10
170+ env :
171+ DATABASE_URL : mysql://root:@localhost:3306/queryx_test
175172 steps :
176173 - uses : actions/checkout@v3
177174 - uses : actions/download-artifact@v4
@@ -180,28 +177,23 @@ jobs:
180177 path : /usr/local/bin
181178 - run : chmod a+x /usr/local/bin/queryx
182179 - name : generate
183- env :
184- QUERYX_ENV : test
185- DATABASE_URL : mysql://root:@localhost:3306/queryx_test
186180 run : |
187- cd internal/integration
181+ cd internal/integration/client
188182 queryx db:migrate --schema mysql.hcl
189183 queryx generate --schema mysql.hcl
190184 - name : yarn install
191185 run : |
192- cd internal/integration
186+ cd internal/integration/client
193187 yarn install
194188 - name : yarn test
195189 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
202192 sqlite-golang :
203193 needs : [build]
204194 runs-on : ubuntu-latest
195+ env :
196+ DATABASE_URL : sqlite:test.sqlite3
205197 steps :
206198 - uses : actions/checkout@v3
207199 - uses : actions/download-artifact@v4
@@ -210,26 +202,25 @@ jobs:
210202 path : /usr/local/bin
211203 - run : chmod a+x /usr/local/bin/queryx
212204 - name : generate
213- env :
214- QUERYX_ENV : test
215- DATABASE_URL : sqlite:test.sqlite3
216205 run : |
217- cd internal/integration
206+ cd internal/integration/client
218207 queryx db:migrate --schema sqlite.hcl
219208 queryx db:migrate --schema sqlite.hcl
220209 queryx generate --schema sqlite.hcl
221210 - name : golangci-lint
222211 uses : golangci/golangci-lint-action@v3
223212 with :
224213 args : --timeout=3m
225- working-directory : internal/integration/db
214+ working-directory : internal/integration/client/ db
226215 - name : go test
227216 run : |
228- cd internal/integration
217+ cd internal/integration/client
229218 go test -v ./...
230219 sqlite-typescript :
231220 needs : [build]
232221 runs-on : ubuntu-latest
222+ env :
223+ DATABASE_URL : sqlite:test.sqlite3
233224 steps :
234225 - uses : actions/checkout@v3
235226 - uses : actions/download-artifact@v4
@@ -238,22 +229,17 @@ jobs:
238229 path : /usr/local/bin
239230 - run : chmod a+x /usr/local/bin/queryx
240231 - name : generate
241- env :
242- QUERYX_ENV : test
243- DATABASE_URL : sqlite:test.sqlite3
244232 run : |
245- cd internal/integration
233+ cd internal/integration/client
246234 queryx db:migrate --schema sqlite.hcl
247235 queryx generate --schema sqlite.hcl
248236 - name : yarn install
249237 run : |
250- cd internal/integration
238+ cd internal/integration/client
251239 yarn install
252240 - name : yarn test
241+ env :
242+ DATABASE_URL : sqlite:client/test.sqlite3
253243 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