Skip to content

Commit 8138794

Browse files
committed
gen: run each engine's dialect generation as a separate job
The gen workflow generated every dialect in one job, so a failure in one engine hid the results of the others and the PostgreSQL service ran for engines that do not need it. Split it into one job per generated engine (postgresql, clickhouse, sqlite), each uploading its own artifact and checking only its own committed dialect. DuckDB has no CLI release to download yet, so it still has no job. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PDAdd694tS93jQsF4X5Hqb
1 parent 586dfb2 commit 8138794

1 file changed

Lines changed: 47 additions & 9 deletions

File tree

‎.github/workflows/gen.yml‎

Lines changed: 47 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: gen
22
on:
33
workflow_dispatch:
44
jobs:
5-
generate:
6-
name: generate dialects
5+
postgresql:
6+
name: generate postgresql dialect
77
runs-on: ubuntu-24.04
88
services:
99
postgres:
@@ -18,22 +18,60 @@ jobs:
1818
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
1919
steps:
2020
- uses: actions/checkout@v7
21+
- uses: actions/setup-go@v7
22+
with:
23+
go-version-file: internal/goldeneye/go.mod
24+
check-latest: true
25+
- run: go run ./cmd/goldeneye generate postgresql
26+
working-directory: internal/goldeneye
27+
env:
28+
POSTGRESQL_SERVER_URI: postgres://postgres:postgres@localhost:${{ job.services.postgres.ports['5432'] }}/postgres?sslmode=disable
29+
- name: Save results
30+
uses: actions/upload-artifact@v7
31+
with:
32+
name: dialect-postgresql
33+
path: internal/engine/postgresql/dialect
34+
- name: Fail if the committed dialect differs
35+
run: git add -N internal/engine/postgresql && git diff --exit-code --stat -- internal/engine/postgresql
36+
37+
clickhouse:
38+
name: generate clickhouse dialect
39+
runs-on: ubuntu-24.04
40+
steps:
41+
- uses: actions/checkout@v7
2142
- uses: actions/setup-go@v7
2243
with:
2344
go-version-file: internal/goldeneye/go.mod
2445
check-latest: true
2546
- run: go run ./cmd/goldeneye install clickhouse
2647
working-directory: internal/goldeneye
48+
- run: go run ./cmd/goldeneye generate clickhouse
49+
working-directory: internal/goldeneye
50+
- name: Save results
51+
uses: actions/upload-artifact@v7
52+
with:
53+
name: dialect-clickhouse
54+
path: internal/engine/clickhouse/dialect
55+
- name: Fail if the committed dialect differs
56+
run: git add -N internal/engine/clickhouse && git diff --exit-code --stat -- internal/engine/clickhouse
57+
58+
sqlite:
59+
name: generate sqlite dialect
60+
runs-on: ubuntu-24.04
61+
steps:
62+
- uses: actions/checkout@v7
63+
- uses: actions/setup-go@v7
64+
with:
65+
go-version-file: internal/goldeneye/go.mod
66+
check-latest: true
2767
- run: go run ./cmd/goldeneye install sqlite
2868
working-directory: internal/goldeneye
29-
- run: go run ./cmd/goldeneye generate
69+
- run: go run ./cmd/goldeneye generate sqlite
3070
working-directory: internal/goldeneye
31-
env:
32-
POSTGRESQL_SERVER_URI: postgres://postgres:postgres@localhost:${{ job.services.postgres.ports['5432'] }}/postgres?sslmode=disable
3371
- name: Save results
3472
uses: actions/upload-artifact@v7
3573
with:
36-
name: dialects
37-
path: internal/engine/*/dialect
38-
- name: Fail if the committed dialects differ
39-
run: git add -N internal/engine && git diff --exit-code --stat -- internal/engine
74+
name: dialect-sqlite
75+
path: internal/engine/sqlite/dialect
76+
- name: Fail if the committed dialect differs
77+
run: git add -N internal/engine/sqlite && git diff --exit-code --stat -- internal/engine/sqlite

0 commit comments

Comments
 (0)