Skip to content

Commit e8241f9

Browse files
committed
ci: check PostgreSQL parser compatibility
1 parent 5fcdd18 commit e8241f9

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ on:
55
branches: [main]
66
pull_request:
77
branches: [main]
8+
schedule:
9+
- cron: '17 3 * * 1'
810

911
jobs:
1012
build-and-test:
13+
if: github.event_name != 'schedule'
1114
strategy:
1215
matrix:
1316
os: [ubuntu-22.04, ubuntu-24.04]
@@ -22,6 +25,7 @@ jobs:
2225
run: make -f Makefile clean && make -f Makefile all
2326

2427
macos:
28+
if: github.event_name != 'schedule'
2529
runs-on: macos-latest
2630
steps:
2731
- uses: actions/checkout@v4
@@ -38,6 +42,7 @@ jobs:
3842
run: make -f Makefile clean && make -f Makefile all MYSQL_CFLAGS="-I/opt/homebrew/opt/mysql-client/include"
3943

4044
benchmark:
45+
if: github.event_name != 'schedule'
4146
runs-on: ubuntu-24.04
4247
steps:
4348
- uses: actions/checkout@v4
@@ -58,6 +63,7 @@ jobs:
5863
path: benchmark_results.json
5964

6065
corpus-test:
66+
if: github.event_name != 'schedule'
6167
runs-on: ubuntu-24.04
6268
steps:
6369
- uses: actions/checkout@v4
@@ -96,3 +102,43 @@ jobs:
96102
grep -ohP '"((?:SELECT|INSERT|UPDATE|DELETE|SET|CREATE|ALTER|DROP|EXPLAIN|WITH)[^"]*)"' \
97103
/tmp/sqlparser-rs/tests/sqlparser_postgres.rs 2>/dev/null | \
98104
sed 's/^"//' | sed 's/"$//' | sed 's/\\"/"/g' | ./corpus_test pgsql
105+
106+
pg-compat:
107+
if: github.event_name != 'schedule'
108+
runs-on: ubuntu-24.04
109+
timeout-minutes: 30
110+
env:
111+
PG_COMPAT_CACHE: /tmp/parsersql-pg-compat
112+
steps:
113+
- uses: actions/checkout@v4
114+
115+
- name: Cache PostgreSQL compatibility sources
116+
uses: actions/cache@v4
117+
with:
118+
path: /tmp/parsersql-pg-compat
119+
key: pg-compat-${{ runner.os }}-${{ hashFiles('tests/pg_compat/upstream_pins.json') }}
120+
restore-keys: |
121+
pg-compat-${{ runner.os }}-
122+
123+
- name: Test PostgreSQL compatibility gate
124+
run: make -f Makefile test-pg-compat
125+
126+
pg-compat-full:
127+
if: github.event_name == 'schedule'
128+
runs-on: ubuntu-24.04
129+
timeout-minutes: 45
130+
env:
131+
PG_COMPAT_CACHE: /tmp/parsersql-pg-compat
132+
steps:
133+
- uses: actions/checkout@v4
134+
135+
- name: Cache PostgreSQL compatibility sources
136+
uses: actions/cache@v4
137+
with:
138+
path: /tmp/parsersql-pg-compat
139+
key: pg-compat-${{ runner.os }}-${{ hashFiles('tests/pg_compat/upstream_pins.json') }}
140+
restore-keys: |
141+
pg-compat-${{ runner.os }}-
142+
143+
- name: Validate full PostgreSQL compatibility baseline
144+
run: make -f Makefile pg-compat

0 commit comments

Comments
 (0)