Skip to content

Commit fd0d613

Browse files
kyleconroyclaude
andcommitted
Keep gen.yml and make the goldeneye workflow check only
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VrrewZQhCf82hp68FWNFLj
1 parent cd73bf7 commit fd0d613

3 files changed

Lines changed: 44 additions & 36 deletions

File tree

‎.github/workflows/gen.yml‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: goldeneye
2+
on:
3+
workflow_dispatch:
4+
jobs:
5+
generate:
6+
name: generate dialects
7+
runs-on: ubuntu-24.04
8+
services:
9+
postgres:
10+
image: postgres:16
11+
env:
12+
POSTGRES_USER: postgres
13+
POSTGRES_PASSWORD: postgres
14+
POSTGRES_DB: postgres
15+
ports:
16+
- 5432:5432
17+
# needed because the postgres container does not provide a healthcheck
18+
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
19+
steps:
20+
- 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 install clickhouse
26+
working-directory: internal/goldeneye
27+
- run: go run ./cmd/goldeneye generate
28+
working-directory: internal/goldeneye
29+
env:
30+
POSTGRESQL_SERVER_URI: postgres://postgres:postgres@localhost:${{ job.services.postgres.ports['5432'] }}/postgres?sslmode=disable
31+
- name: Save results
32+
uses: actions/upload-artifact@v7
33+
with:
34+
name: dialects
35+
path: internal/engine/*/dialect

‎.github/workflows/goldeneye.yml‎

Lines changed: 6 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,9 @@
11
name: goldeneye
22
on:
33
workflow_dispatch:
4-
inputs:
5-
command:
6-
description: check the committed dialect files against the databases, or generate them and upload the result
7-
type: choice
8-
options:
9-
- check
10-
- generate
11-
default: check
124
jobs:
13-
goldeneye:
14-
name: ${{ inputs.command }} dialects
5+
check:
6+
name: check dialects
157
runs-on: ubuntu-24.04
168
services:
179
postgres:
@@ -24,37 +16,17 @@ jobs:
2416
- 5432:5432
2517
# needed because the postgres container does not provide a healthcheck
2618
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
27-
env:
28-
POSTGRESQL_SERVER_URI: postgres://postgres:postgres@localhost:${{ job.services.postgres.ports['5432'] }}/postgres?sslmode=disable
29-
defaults:
30-
run:
31-
working-directory: internal/goldeneye
3219
steps:
3320
- uses: actions/checkout@v7
3421
- uses: actions/setup-go@v7
3522
with:
3623
go-version-file: internal/goldeneye/go.mod
3724
check-latest: true
38-
3925
- name: install clickhouse
4026
run: go run ./cmd/goldeneye install clickhouse
41-
27+
working-directory: internal/goldeneye
4228
- name: check
43-
if: inputs.command == 'check'
4429
run: go test -v ./...
45-
46-
- name: generate
47-
if: inputs.command == 'generate'
48-
run: go run ./cmd/goldeneye generate
49-
50-
- name: show changes
51-
if: inputs.command == 'generate'
52-
run: git status --short && git diff --stat
53-
working-directory: .
54-
55-
- name: upload dialects
56-
if: inputs.command == 'generate'
57-
uses: actions/upload-artifact@v7
58-
with:
59-
name: dialects
60-
path: internal/engine/*/dialect
30+
working-directory: internal/goldeneye
31+
env:
32+
POSTGRESQL_SERVER_URI: postgres://postgres:postgres@localhost:${{ job.services.postgres.ports['5432'] }}/postgres?sslmode=disable

‎CLAUDE.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,9 @@ go run ./cmd/goldeneye generate postgresql # rewrite the files after a change
158158
```
159159

160160
The checks are not part of CI. The `goldeneye` workflow
161-
(`.github/workflows/goldeneye.yml`) runs them on demand, or generates the
162-
files and uploads them as an artifact.
161+
(`.github/workflows/goldeneye.yml`) runs them on demand, and the `gen`
162+
workflow (`.github/workflows/gen.yml`) generates the files and uploads them
163+
as an artifact.
163164

164165
### Example Tests
165166

0 commit comments

Comments
 (0)