Repository navigation
192 lines (186 loc) · 6.89 KB
/
Copy pathgen.yml
File metadata and controls
192 lines (186 loc) · 6.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
name: gen
on:
workflow_dispatch:
jobs:
postgresql:
name: generate postgresql dialect
runs-on: ubuntu-24.04
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version-file: internal/goldeneye/go.mod
check-latest: true
- run: go run ./cmd/goldeneye generate postgresql
working-directory: internal/goldeneye
env:
POSTGRESQL_SERVER_URI: postgres://postgres:postgres@localhost:${{ job.services.postgres.ports['5432'] }}/postgres?sslmode=disable
- name: Save results
uses: actions/upload-artifact@v7
with:
name: dialect-postgresql
path: internal/engine/postgresql/dialect
- name: Fail if the committed dialect differs
run: git add -N internal/engine/postgresql && git diff --exit-code --stat -- internal/engine/postgresql
mysql:
name: generate mysql dialect
runs-on: ubuntu-24.04
services:
mysql:
image: mysql:26.7
env:
MYSQL_ROOT_PASSWORD: mysecretpassword
ports:
- 3306:3306
options: --health-cmd "mysqladmin ping -h 127.0.0.1 -pmysecretpassword" --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version-file: internal/goldeneye/go.mod
check-latest: true
- run: go run ./cmd/goldeneye generate mysql
working-directory: internal/goldeneye
env:
MYSQL_SERVER_URI: root:mysecretpassword@tcp(localhost:${{ job.services.mysql.ports['3306'] }})/mysql
- name: Save results
uses: actions/upload-artifact@v7
with:
name: dialect-mysql
path: internal/engine/dolphin/dialect
- name: Fail if the committed dialect differs
run: git add -N internal/engine/dolphin && git diff --exit-code --stat -- internal/engine/dolphin
clickhouse:
name: generate clickhouse dialect
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version-file: internal/goldeneye/go.mod
check-latest: true
- run: go run ./cmd/goldeneye install clickhouse
working-directory: internal/goldeneye
- run: go run ./cmd/goldeneye generate clickhouse
working-directory: internal/goldeneye
- name: Save results
uses: actions/upload-artifact@v7
with:
name: dialect-clickhouse
path: internal/engine/clickhouse/dialect
- name: Fail if the committed dialect differs
run: git add -N internal/engine/clickhouse && git diff --exit-code --stat -- internal/engine/clickhouse
sqlite:
name: generate sqlite dialect
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version-file: internal/goldeneye/go.mod
check-latest: true
- run: go run ./cmd/goldeneye install sqlite
working-directory: internal/goldeneye
- run: go run ./cmd/goldeneye generate sqlite
working-directory: internal/goldeneye
- name: Save results
uses: actions/upload-artifact@v7
with:
name: dialect-sqlite
path: internal/engine/sqlite/dialect
- name: Fail if the committed dialect differs
run: git add -N internal/engine/sqlite && git diff --exit-code --stat -- internal/engine/sqlite
mssql:
name: generate mssql dialect
runs-on: ubuntu-24.04
services:
mssql:
image: mcr.microsoft.com/mssql/server:2025-latest
env:
ACCEPT_EULA: Y
MSSQL_SA_PASSWORD: Mysecretpassword1!
ports:
- 1433:1433
options: --health-cmd "/opt/mssql-tools18/bin/sqlcmd -C -S localhost -U sa -P 'Mysecretpassword1!' -Q 'SELECT 1'" --health-interval 10s --health-timeout 5s --health-retries 10
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version-file: internal/goldeneye/go.mod
check-latest: true
- run: go run ./cmd/goldeneye generate mssql
working-directory: internal/goldeneye
env:
MSSQL_SERVER_URI: sqlserver://sa:Mysecretpassword1!@localhost:${{ job.services.mssql.ports['1433'] }}?encrypt=disable
- name: Save results
uses: actions/upload-artifact@v7
with:
name: dialect-mssql
path: internal/engine/mssql/dialect
- name: Fail if the committed dialect differs
run: git add -N internal/engine/mssql && git diff --exit-code --stat -- internal/engine/mssql
spanner:
name: generate googlesql dialect
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version-file: internal/goldeneye/go.mod
check-latest: true
# Spanner Omni is run the way its quickstart runs it, on the host
# network, since a service container cannot be given a command.
- name: Start Spanner Omni
run: |
docker run -d --name spanneromni --network host us-docker.pkg.dev/spanner-omni/images/spanner-omni:2026.r2.1-beta start-single-server
for i in $(seq 1 60); do
if docker exec spanneromni /google/spanner/bin/spanner databases list >/dev/null 2>&1; then exit 0; fi
sleep 5
done
docker logs spanneromni
exit 1
- run: go run ./cmd/goldeneye generate spanner
working-directory: internal/goldeneye
env:
SPANNER_SERVER_URI: localhost:15000
- name: Save results
uses: actions/upload-artifact@v7
with:
name: dialect-googlesql
path: internal/engine/googlesql/dialect
- name: Fail if the committed dialect differs
run: git add -N internal/engine/googlesql && git diff --exit-code --stat -- internal/engine/googlesql
duckdb:
name: generate duckdb dialect
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version-file: internal/goldeneye/go.mod
check-latest: true
# The current build of DuckDB's v2.0 preview channel, until 2.0 is
# released: a later build than the dialect was generated from shows up
# as a difference.
- run: go run ./cmd/goldeneye install duckdb
working-directory: internal/goldeneye
- run: go run ./cmd/goldeneye generate duckdb
working-directory: internal/goldeneye
- name: Save results
uses: actions/upload-artifact@v7
with:
name: dialect-duckdb
path: internal/engine/duckdb/dialect
- name: Fail if the committed dialect differs
run: git add -N internal/engine/duckdb && git diff --exit-code --stat -- internal/engine/duckdb