Skip to content

Commit 2366c1f

Browse files
committed
fix env in action
1 parent f6575a0 commit 2366c1f

File tree

2 files changed

+21
-27
lines changed

2 files changed

+21
-27
lines changed

.github/workflows/client.yml

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
name: client
2+
3+
env:
4+
QUERYX_ENV: test
5+
26
on:
37
push:
48
paths-ignore:
@@ -14,8 +18,6 @@ jobs:
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
@@ -44,6 +46,8 @@ jobs:
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,9 +56,6 @@ 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: |
5960
cd internal/integration/client
6061
queryx db:migrate --schema postgresql.hcl
@@ -86,6 +87,8 @@ jobs:
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,9 +97,6 @@ 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: |
101101
cd internal/integration/client
102102
queryx db:migrate --schema postgresql.hcl
@@ -126,6 +126,8 @@ jobs:
126126
--health-start-period 10s
127127
--health-timeout 5s
128128
--health-retries 10
129+
env:
130+
DATABASE_URL: mysql://root:@localhost:3306/queryx_test
129131
steps:
130132
- uses: actions/checkout@v3
131133
- uses: actions/download-artifact@v4
@@ -134,9 +136,6 @@ jobs:
134136
path: /usr/local/bin
135137
- run: chmod a+x /usr/local/bin/queryx
136138
- name: generate
137-
env:
138-
QUERYX_ENV: test
139-
DATABASE_URL: mysql://root:@localhost:3306/queryx_test
140139
run: |
141140
cd internal/integration/client
142141
queryx db:migrate --schema mysql.hcl
@@ -168,6 +167,8 @@ jobs:
168167
--health-start-period 10s
169168
--health-timeout 5s
170169
--health-retries 10
170+
env:
171+
DATABASE_URL: mysql://root:@localhost:3306/queryx_test
171172
steps:
172173
- uses: actions/checkout@v3
173174
- uses: actions/download-artifact@v4
@@ -176,9 +177,6 @@ jobs:
176177
path: /usr/local/bin
177178
- run: chmod a+x /usr/local/bin/queryx
178179
- name: generate
179-
env:
180-
QUERYX_ENV: test
181-
DATABASE_URL: mysql://root:@localhost:3306/queryx_test
182180
run: |
183181
cd internal/integration/client
184182
queryx db:migrate --schema mysql.hcl
@@ -194,6 +192,8 @@ jobs:
194192
sqlite-golang:
195193
needs: [build]
196194
runs-on: ubuntu-latest
195+
env:
196+
DATABASE_URL: sqlite:test.sqlite3
197197
steps:
198198
- uses: actions/checkout@v3
199199
- uses: actions/download-artifact@v4
@@ -202,9 +202,6 @@ jobs:
202202
path: /usr/local/bin
203203
- run: chmod a+x /usr/local/bin/queryx
204204
- name: generate
205-
env:
206-
QUERYX_ENV: test
207-
DATABASE_URL: sqlite:test.sqlite3
208205
run: |
209206
cd internal/integration/client
210207
queryx db:migrate --schema sqlite.hcl
@@ -224,6 +221,8 @@ jobs:
224221
sqlite-typescript:
225222
needs: [build]
226223
runs-on: ubuntu-latest
224+
env:
225+
DATABASE_URL: sqlite:test.sqlite3
227226
steps:
228227
- uses: actions/checkout@v3
229228
- uses: actions/download-artifact@v4
@@ -232,9 +231,6 @@ jobs:
232231
path: /usr/local/bin
233232
- run: chmod a+x /usr/local/bin/queryx
234233
- name: generate
235-
env:
236-
QUERYX_ENV: test
237-
DATABASE_URL: sqlite:test.sqlite3
238234
run: |
239235
cd internal/integration/client
240236
queryx db:migrate --schema sqlite.hcl
@@ -245,7 +241,6 @@ jobs:
245241
yarn install
246242
- name: yarn test
247243
env:
248-
QUERYX_ENV: test
249244
DATABASE_URL: sqlite:client/test.sqlite3
250245
run: |
251246
cd internal/integration/client

.github/workflows/postgresql.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
name: postgresql
2+
3+
env:
4+
QUERYX_ENV: test
5+
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/queryx_test?sslmode=disable
6+
27
on:
38
push:
49
paths-ignore:
@@ -49,9 +54,6 @@ jobs:
4954
path: /usr/local/bin
5055
- run: chmod a+x /usr/local/bin/queryx
5156
- name: generate
52-
env:
53-
QUERYX_ENV: test
54-
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/queryx_test?sslmode=disable
5557
run: |
5658
cd internal/integration/postgresql
5759
queryx db:migrate
@@ -85,9 +87,6 @@ jobs:
8587
path: /usr/local/bin
8688
- run: chmod a+x /usr/local/bin/queryx
8789
- name: generate
88-
env:
89-
QUERYX_ENV: test
90-
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/queryx_test?sslmode=disable
9190
run: |
9291
cd internal/integration/postgresql
9392
queryx db:migrate

0 commit comments

Comments
 (0)