|
5 | 5 | branches: [main] |
6 | 6 | pull_request: |
7 | 7 | branches: [main] |
| 8 | + schedule: |
| 9 | + - cron: '17 3 * * 1' |
8 | 10 |
|
9 | 11 | jobs: |
10 | 12 | build-and-test: |
| 13 | + if: github.event_name != 'schedule' |
11 | 14 | strategy: |
12 | 15 | matrix: |
13 | 16 | os: [ubuntu-22.04, ubuntu-24.04] |
|
22 | 25 | run: make -f Makefile clean && make -f Makefile all |
23 | 26 |
|
24 | 27 | macos: |
| 28 | + if: github.event_name != 'schedule' |
25 | 29 | runs-on: macos-latest |
26 | 30 | steps: |
27 | 31 | - uses: actions/checkout@v4 |
|
38 | 42 | run: make -f Makefile clean && make -f Makefile all MYSQL_CFLAGS="-I/opt/homebrew/opt/mysql-client/include" |
39 | 43 |
|
40 | 44 | benchmark: |
| 45 | + if: github.event_name != 'schedule' |
41 | 46 | runs-on: ubuntu-24.04 |
42 | 47 | steps: |
43 | 48 | - uses: actions/checkout@v4 |
|
58 | 63 | path: benchmark_results.json |
59 | 64 |
|
60 | 65 | corpus-test: |
| 66 | + if: github.event_name != 'schedule' |
61 | 67 | runs-on: ubuntu-24.04 |
62 | 68 | steps: |
63 | 69 | - uses: actions/checkout@v4 |
@@ -96,3 +102,43 @@ jobs: |
96 | 102 | grep -ohP '"((?:SELECT|INSERT|UPDATE|DELETE|SET|CREATE|ALTER|DROP|EXPLAIN|WITH)[^"]*)"' \ |
97 | 103 | /tmp/sqlparser-rs/tests/sqlparser_postgres.rs 2>/dev/null | \ |
98 | 104 | 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