File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6666 MYSQL_SERVER_URI : " root:mysecretpassword@tcp(127.0.0.1:3306)/mysql?multiStatements=true&parseTime=true"
6767 CGO_ENABLED : " 0"
6868
69- goldeneye :
70- name : check dialects
71- runs-on : ubuntu-24.04
72- services :
73- postgres :
74- image : postgres:16
75- env :
76- POSTGRES_USER : postgres
77- POSTGRES_PASSWORD : postgres
78- POSTGRES_DB : postgres
79- ports :
80- - 5432:5432
81- # needed because the postgres container does not provide a healthcheck
82- options : --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
83- steps :
84- - uses : actions/checkout@v7
85- - uses : actions/setup-go@v7
86- with :
87- go-version : ' 1.26.5'
88-
89- - name : install clickhouse
90- run : go run ./cmd/goldeneye install clickhouse
91- working-directory : internal/goldeneye
92-
93- - name : test internal/goldeneye
94- run : go test ./...
95- working-directory : internal/goldeneye
96- env :
97- POSTGRESQL_SERVER_URI : postgres://postgres:postgres@localhost:${{ job.services.postgres.ports['5432'] }}/postgres?sslmode=disable
98-
9969 vuln_check :
10070 runs-on : ubuntu-24.04
10171 timeout-minutes : 5
Load diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : goldeneye
2+ on :
3+ 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
12+ jobs :
13+ goldeneye :
14+ name : ${{ inputs.command }} dialects
15+ runs-on : ubuntu-24.04
16+ services :
17+ postgres :
18+ image : postgres:16
19+ env :
20+ POSTGRES_USER : postgres
21+ POSTGRES_PASSWORD : postgres
22+ POSTGRES_DB : postgres
23+ ports :
24+ - 5432:5432
25+ # needed because the postgres container does not provide a healthcheck
26+ 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
32+ steps :
33+ - uses : actions/checkout@v7
34+ - uses : actions/setup-go@v7
35+ with :
36+ go-version-file : internal/goldeneye/go.mod
37+ check-latest : true
38+
39+ - name : install clickhouse
40+ run : go run ./cmd/goldeneye install clickhouse
41+
42+ - name : check
43+ if : inputs.command == 'check'
44+ 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
Original file line number Diff line number Diff line change @@ -157,6 +157,10 @@ POSTGRESQL_SERVER_URI="postgres://postgres:postgres@127.0.0.1:5432/postgres?sslm
157157go run ./cmd/goldeneye generate postgresql # rewrite the files after a change
158158```
159159
160+ 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.
163+
160164### Example Tests
161165
162166- ** Location:** ` /examples/ ` directory
You can’t perform that action at this time.
0 commit comments