From 8138794f6d6b801bed19cdf0c0433ed5c8cf35f9 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 5 Sep 2026 17:22:08 +0000 Subject: [PATCH] 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 Claude-Session: https://claude.ai/code/session_01PDAdd694tS93jQsF4X5Hqb --- .github/workflows/gen.yml | 56 ++++++++++++++++++++++++++++++++------- 1 file changed, 47 insertions(+), 9 deletions(-) diff --git a/.github/workflows/gen.yml b/.github/workflows/gen.yml index 691c06d4da..317a10d68b 100644 --- a/.github/workflows/gen.yml +++ b/.github/workflows/gen.yml @@ -2,8 +2,8 @@ name: gen on: workflow_dispatch: jobs: - generate: - name: generate dialects + postgresql: + name: generate postgresql dialect runs-on: ubuntu-24.04 services: postgres: @@ -18,22 +18,60 @@ jobs: 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 + + 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 + - run: go run ./cmd/goldeneye generate sqlite 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: dialects - path: internal/engine/*/dialect - - name: Fail if the committed dialects differ - run: git add -N internal/engine && git diff --exit-code --stat -- internal/engine + 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