forked from sqlancer/sqlancer
-
Notifications
You must be signed in to change notification settings - Fork 0
733 lines (701 loc) · 23.9 KB
/
main.yml
File metadata and controls
733 lines (701 loc) · 23.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
name: ci
on:
push:
branches:
- main
paths:
- 'src/**'
- 'test/**'
- '.github/workflows/*.yml'
- 'pom.xml'
pull_request:
branches:
- main
paths:
- 'src/**'
- 'test/**'
- '.github/workflows/*.yml'
- 'pom.xml'
jobs:
misc:
name: General tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
cache: 'maven'
- name: Verify
run: mvn -B verify -DskipTests=true
- name: Misc Tests
run: mvn -B '-Dtest=!sqlancer.dbms.**,!sqlancer.qpg.**,!sqlancer.reducer.**' test
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Naming Convention Tests
run: python src/check_names.py
citus:
name: DBMS Tests (Citus)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
cache: 'maven'
- name: Build SQLancer
run: mvn -B package -DskipTests=true
- name: Set up Citus
run: |
echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list
curl https://install.citusdata.com/community/deb.sh | sudo bash
sudo apt-get -y install postgresql-15-citus-11.1
sudo chown -R $USER:$USER /var/run/postgresql
export PATH=/usr/lib/postgresql/15/bin:$PATH
cd ~
mkdir -p citus/coordinator citus/worker1 citus/worker2
initdb -D citus/coordinator
initdb -D citus/worker1
initdb -D citus/worker2
echo "shared_preload_libraries = 'citus'" >> citus/coordinator/postgresql.conf
echo "shared_preload_libraries = 'citus'" >> citus/worker1/postgresql.conf
echo "shared_preload_libraries = 'citus'" >> citus/worker2/postgresql.conf
pg_ctl -D citus/coordinator -o "-p 9700" -l coordinator_logfile start || cat coordinator_logfile || cat citus/coordinator/coordinator_logfile
pg_ctl -D citus/worker1 -o "-p 9701" -l worker1_logfile start
ls citus/worker1
pg_ctl -D citus/worker2 -o "-p 9702" -l worker2_logfile start
psql -c "CREATE ROLE sqlancer SUPERUSER LOGIN CREATEDB PASSWORD 'sqlancer';" -p 9700 -d postgres -U $USER
createdb test -p 9700 -U $USER
psql -c "CREATE ROLE sqlancer SUPERUSER LOGIN CREATEDB PASSWORD 'sqlancer';" -p 9701 -d postgres -U $USER
createdb test -p 9701 -U $USER
psql -c "CREATE ROLE sqlancer SUPERUSER LOGIN CREATEDB PASSWORD 'sqlancer';" -p 9702 -d postgres -U $USER
createdb test -p 9702 -U $USER
psql -c "CREATE EXTENSION citus;" -p 9700 -U $USER -d test
psql -c "CREATE EXTENSION citus;" -p 9701 -U $USER -d test
psql -c "CREATE EXTENSION citus;" -p 9702 -U $USER -d test
psql -c "SELECT * from citus_add_node('localhost', 9701);" -p 9700 -U $USER -d test
psql -c "SELECT * from citus_add_node('localhost', 9702);" -p 9700 -U $USER -d test
- name: Run Tests
run: CITUS_AVAILABLE=true mvn -Dtest=TestCitus test
cnosdb:
name: DBMS Tests (CnosDB)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
cache: 'maven'
- name: Build SQLancer
run: mvn -B package -DskipTests=true
- name: Set up ClickHouse
run: |
docker pull cnosdb/cnosdb:community-latest
docker run --name cnosdb -p 8902:8902 -d cnosdb/cnosdb:community-latest
sleep 5
- name: Run Tests
run: |
CNOSDB_AVAILABLE=true mvn -Dtest=TestCnosDBNoREC test
sleep 20
CNOSDB_AVAILABLE=true mvn -Dtest=TestCnosDBTLP test
clickhouse:
name: DBMS Tests (ClickHouse)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
cache: 'maven'
- name: Build SQLancer
run: mvn -B package -DskipTests=true
- name: Set up ClickHouse
run: |
docker pull clickhouse/clickhouse-server:24.3.1.2672
docker run --ulimit nofile=262144:262144 --name clickhouse-server -p8123:8123 -d clickhouse/clickhouse-server:24.3.1.2672
sleep 5
- name: Run Tests
run: CLICKHOUSE_AVAILABLE=true mvn -Dtest=ClickHouseBinaryComparisonOperationTest,TestClickHouse,ClickHouseOperatorsVisitorTest,ClickHouseToStringVisitorTest test
- name: Show fatal errors
run: docker exec clickhouse-server grep Fatal /var/log/clickhouse-server/clickhouse-server.log || echo No Fatal Errors found
- name: Teardown ClickHouse server
run: |
docker stop clickhouse-server
docker rm clickhouse-server
cockroachdb:
name: DBMS Tests (CockroachDB)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
cache: 'maven'
- name: Build SQLancer
run: mvn -B package -DskipTests=true
- name: Set up CockroachDB
run: |
wget -qO- https://binaries.cockroachdb.com/cockroach-v24.2.0.linux-amd64.tgz | tar xvz
cd cockroach-v24.2.0.linux-amd64/ && ./cockroach start-single-node --insecure &
sleep 10
- name: Create SQLancer user
run: cd cockroach-v24.2.0.linux-amd64/ && ./cockroach sql --insecure -e "CREATE USER sqlancer; GRANT admin to sqlancer" && cd ..
- name: Run Tests
run: |
COCKROACHDB_AVAILABLE=true mvn -Dtest=TestCockroachDBNoREC test
COCKROACHDB_AVAILABLE=true mvn -Dtest=TestCockroachDBTLP test
COCKROACHDB_AVAILABLE=true mvn -Dtest=TestCockroachDBCERT test
cockroachdb-qpg:
name: QPG Tests (CockroachDB)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
cache: 'maven'
- name: Build SQLancer
run: mvn -B package -DskipTests=true
- name: Set up CockroachDB
run: |
wget -qO- https://binaries.cockroachdb.com/cockroach-v24.2.0.linux-amd64.tgz | tar xvz
cd cockroach-v24.2.0.linux-amd64/ && ./cockroach start-single-node --insecure &
sleep 10
- name: Create SQLancer user
run: cd cockroach-v24.2.0.linux-amd64/ && ./cockroach sql --insecure -e "CREATE USER sqlancer; GRANT admin to sqlancer" && cd ..
- name: Run Tests
run: COCKROACHDB_AVAILABLE=true mvn -Dtest=TestCockroachDBQPG test
databend:
name: DBMS Tests (Databend)
runs-on: ubuntu-latest
services:
databend:
image: datafuselabs/databend:v1.2.687-nightly
env:
QUERY_DEFAULT_USER: sqlancer
QUERY_DEFAULT_PASSWORD: sqlancer
ports:
- 8000:8000
- 3307:3307
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
cache: 'maven'
- name: Build SQLancer
run: mvn -B package -DskipTests=true
- name: Run Tests
run: |
DATABEND_AVAILABLE=true mvn -Dtest=TestDatabendTLP test
DATABEND_AVAILABLE=true mvn -Dtest=TestDatabendNoREC test
DATABEND_AVAILABLE=true mvn -Dtest=TestDatabendPQS test
datafusion:
name: DBMS Tests (DataFusion)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Run DataFusion Server
run: |
cd src/sqlancer/datafusion/server/datafusion_server
cargo run & sleep 300
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
cache: 'maven'
- name: Build SQLancer
run: mvn -B package -DskipTests=true
- name: Run Tests
run: |
DATAFUSION_AVAILABLE=true mvn test -Pdatafusion-tests
duckdb:
name: DBMS Tests (DuckDB)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
cache: 'maven'
- name: Build
run: mvn -B package -DskipTests=true
- name: DuckDB Tests
run: |
mvn -Dtest=TestDuckDBTLP test
mvn -Dtest=TestDuckDBNoREC test
h2:
name: DBMS Tests (H2)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
cache: 'maven'
- name: Build SQLancer
run: mvn -B package -DskipTests=true
- name: Run Tests
run: mvn -Dtest=TestH2 test
hive:
name: DBMS Tests (Hive)
runs-on: ubuntu-latest
services:
metastore:
image: apache/hive:4.0.1
env:
SERVICE_NAME: 'metastore'
ports:
- 9083:9083
volumes:
- warehouse:/opt/hive/data/warehouse
hiveserver2:
image: apache/hive:4.0.1
env:
SERVICE_NAME: 'hiveserver2'
ports:
- 10000:10000
- 10002:10002
volumes:
- warehouse:/opt/hive/data/warehouse
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
cache: 'maven'
- name: Build SQLancer
run: mvn -B package -DskipTests=true
- name: Run Tests
run: HIVE_AVAILABLE=true mvn -Dtest=TestHiveTLP test
hsqldb:
name: DBMS Tests (HSQLB)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
cache: 'maven'
- name: Build SQLancer
run: mvn -B package -DskipTests=true
- name: Run Tests
run: |
mvn -Dtest=TestHSQLDBNoREC test
mvn -Dtest=TestHSQLDBTLP test
mariadb:
name: DBMS Tests (MariaDB)
runs-on: ubuntu-latest
services:
mysql:
image: mariadb:11.7.2
env:
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306
options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=10
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
cache: 'maven'
- name: Build SQLancer
run: mvn -B package -DskipTests=true
- name: Create SQLancer User
run: sudo mysql -h 127.0.0.1 -uroot -proot -e "CREATE USER 'sqlancer'@'%' IDENTIFIED BY 'sqlancer'; GRANT ALL PRIVILEGES ON * . * TO 'sqlancer'@'%';"
- name: Run Tests
run: MARIADB_AVAILABLE=true mvn -Dtest=TestMariaDB test
materialize:
name: DBMS Tests (Materialize)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Materialize
run: |
docker pull materialize/materialized:latest
docker run -d -p6875:6875 -p6877:6877 -p 26257:26257 materialize/materialized:latest
sleep 5
# Workaround for https://github.com/cockroachdb/cockroach/issues/93892
psql postgres://root@localhost:26257 -c "SET CLUSTER SETTING sql.stats.forecasts.enabled = false"
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
cache: 'maven'
- name: Build SQLancer
run: mvn -B package -DskipTests=true
- name: Run Tests
run: |
MATERIALIZE_AVAILABLE=true mvn test -Dtest=TestMaterializeNoREC
MATERIALIZE_AVAILABLE=true mvn test -Dtest=TestMaterializeTLP
MATERIALIZE_AVAILABLE=true mvn test -Dtest=TestMaterializePQS
materialize-qpg:
name: QPG Tests (Materialize)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Materialize
run: |
docker pull materialize/materialized:latest
docker run -d -p6875:6875 -p6877:6877 -p 26257:26257 materialize/materialized:latest
sleep 5
# Workaround for https://github.com/cockroachdb/cockroach/issues/93892
psql postgres://root@localhost:26257 -c "SET CLUSTER SETTING sql.stats.forecasts.enabled = false"
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
cache: 'maven'
- name: Build SQLancer
run: mvn -B package -DskipTests=true
- name: Run Tests
run: |
MATERIALIZE_AVAILABLE=true mvn test -Dtest=TestMaterializeQPG
MATERIALIZE_AVAILABLE=true mvn test -Dtest=TestMaterializeQueryPlan
mysql:
name: DBMS Tests (MySQL)
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0.36
env:
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=10
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
cache: 'maven'
- name: Build SQLancer
run: mvn -B package -DskipTests=true
- name: Create SQLancer user
run: mysql -h 127.0.0.1 -uroot -proot -e "CREATE USER 'sqlancer'@'%' IDENTIFIED BY 'sqlancer'; GRANT ALL PRIVILEGES ON * . * TO 'sqlancer'@'%';"
- name: Run Tests
run: |
MYSQL_AVAILABLE=true mvn test -Dtest=TestMySQLPQS
MYSQL_AVAILABLE=true mvn test -Dtest=TestMySQLTLP
MYSQL_AVAILABLE=true mvn test -Dtest=TestMySQLCERT
MYSQL_AVAILABLE=true mvn test -Dtest=TestMySQLDQE
oceanbase:
name: DBMS Tests (OceanBase)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
cache: 'maven'
- name: Build SQLancer
run: mvn -B package -DskipTests=true
- name: Set up OceanBase
run: |
docker run -p 2881:2881 --name oceanbase-ce -e MODE=mini -d oceanbase/oceanbase-ce:4.2.1-lts
sleep 120
mysql -h127.1 -uroot@test -P2881 -Doceanbase -A -e"CREATE USER 'sqlancer'@'%' IDENTIFIED BY 'sqlancer'; GRANT ALL PRIVILEGES ON * . * TO 'sqlancer'@'%';"
- name: Run Tests
run: |
OCEANBASE_AVAILABLE=true mvn test -Dtest=TestOceanBaseNoREC
OCEANBASE_AVAILABLE=true mvn test -Dtest=TestOceanBasePQS
OCEANBASE_AVAILABLE=true mvn test -Dtest=TestOceanBaseTLP
postgres:
name: DBMS Tests (PostgreSQL)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up PostgreSQL
uses: harmon758/postgresql-action@v1.0.0
with:
postgresql version: '13'
postgresql user: 'sqlancer'
postgresql password: 'sqlancer'
postgresql db: 'test'
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
cache: 'maven'
- name: Build SQLancer
run: mvn -B package -DskipTests=true
- name: Run Tests
run: |
POSTGRES_AVAILABLE=true mvn -Dtest=TestPostgresPQS test
POSTGRES_AVAILABLE=true mvn -Dtest=TestPostgresTLP test
POSTGRES_AVAILABLE=true mvn -Dtest=TestPostgresNoREC test
POSTGRES_AVAILABLE=true mvn -Dtest=TestPostgresCERT test
presto:
name: DBMS Tests (Presto)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
cache: 'maven'
- name: Set up Presto
run: |
docker pull prestodb/presto:latest
echo "connector.name=memory" >> memory.properties
docker run -p 8080:8080 -d -v ./memory.properties:/opt/presto-server/etc/catalog/memory.properties --name presto prestodb/presto:latest
sleep 30
- name: Build SQLancer
run: mvn -B package -DskipTests=true
- name: Run Tests
run: |
PRESTO_AVAILABLE=true mvn -Dtest=TestPrestoNoREC test
docker restart presto && sleep 30
PRESTO_AVAILABLE=true mvn -Dtest=TestPrestoTLP test
sqlite:
name: DBMS Tests (SQLite)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
cache: 'maven'
- name: Build
run: mvn -B package -DskipTests=true
- name: SQLite Tests
run: |
mvn -Dtest=TestSQLitePQS test
mvn -Dtest=TestSQLiteTLP test
mvn -Dtest=TestSQLiteNoREC test
mvn -Dtest=TestSQLiteCODDTest test
sqlite-qpg:
name: QPG Tests (SQLite)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
cache: 'maven'
- name: Build
run: mvn -B package -DskipTests=true
- name: SQLite Tests for QPG
run: |
mvn -Dtest=TestSQLiteQPG test
tidb:
name: DBMS Tests (TiDB)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
cache: 'maven'
- name: Build SQLancer
run: mvn -B package -DskipTests=true
- name: Set up TiDB
run: |
docker pull hawkingrei/tidb-playground:nightly-2025-09-16
docker run --name tidb-server -d -p 4000:4000 hawkingrei/tidb-playground:nightly-2025-09-16
sleep 10
- name: Create SQLancer user
run: sudo mysql -h 127.0.0.1 -P 4000 -u root -D test -e "CREATE USER 'sqlancer'@'%' IDENTIFIED WITH mysql_native_password BY 'sqlancer'; GRANT ALL PRIVILEGES ON *.* TO 'sqlancer'@'%' WITH GRANT OPTION; FLUSH PRIVILEGES;"
- name: Run Tests
run: |
TIDB_AVAILABLE=true mvn -Dtest=TestTiDBTLP test
TIDB_AVAILABLE=true mvn -Dtest=TestTiDBCERT test
tidb-qpg:
name: QPG Tests (TiDB)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
cache: 'maven'
- name: Build SQLancer
run: mvn -B package -DskipTests=true
- name: Set up TiDB
run: |
docker pull hawkingrei/tidb-playground:nightly-2025-09-16
docker run --name tidb-server -d -p 4000:4000 hawkingrei/tidb-playground:nightly-2025-09-16
sleep 10
- name: Create SQLancer user
run: sudo mysql -h 127.0.0.1 -P 4000 -u root -D test -e "CREATE USER 'sqlancer'@'%' IDENTIFIED WITH mysql_native_password BY 'sqlancer'; GRANT ALL PRIVILEGES ON *.* TO 'sqlancer'@'%' WITH GRANT OPTION; FLUSH PRIVILEGES;"
- name: Run Tests
run: TIDB_AVAILABLE=true mvn -Dtest=TestTiDBQPG test
yugabyte:
name: DBMS Tests (YugabyteDB)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
cache: 'maven'
- name: Build SQLancer
run: mvn -B package -DskipTests=true
- name: Set up Yugabyte
run: |
docker pull yugabytedb/yugabyte:latest
docker run -d --name yugabyte -p7000:7000 -p9000:9000 -p5433:5433 -p9042:9042 yugabytedb/yugabyte:latest bin/yugabyted start --daemon=false
sleep 5
- name: Run Tests
run: |
YUGABYTE_AVAILABLE=true mvn -Dtest=TestYSQLNoREC test
YUGABYTE_AVAILABLE=true mvn -Dtest=TestYSQLTLP test
YUGABYTE_AVAILABLE=true mvn -Dtest=TestYSQLPQS test
YUGABYTE_AVAILABLE=true mvn -Dtest=TestYCQL test
doris:
name: DBMS Tests (Apache Doris)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
cache: 'maven'
- name: install mysql client
run: |
sudo apt update
sudo apt install mysql-client --assume-yes
- name: Set up Apache Doris
run: |
sudo sysctl -w vm.max_map_count=2000000
wget -q https://apache-doris-releases.oss-accelerate.aliyuncs.com/apache-doris-2.1.4-bin-x64.tar.gz
tar zxf apache-doris-2.1.4-bin-x64.tar.gz
mv apache-doris-2.1.4-bin-x64 apache-doris
sudo swapoff -a
cd apache-doris/fe
./bin/start_fe.sh --daemon
cd ../be
./bin/start_be.sh --daemon
sleep 30
IP=$(hostname -I | awk '{print $1}')
mysql -u root -h 127.0.0.1 --port 9030 -e "ALTER SYSTEM ADD BACKEND '${IP}:9050';"
mysql -u root -h 127.0.0.1 --port 9030 -e "CREATE USER 'sqlancer' IDENTIFIED BY 'sqlancer'; GRANT ALL ON *.* TO sqlancer;"
- name: Build SQLancer
run: mvn -B package -DskipTests=true
- name: Run Tests
run: |
DORIS_AVAILABLE=true mvn -Dtest=TestDorisNoREC test
DORIS_AVAILABLE=true mvn -Dtest=TestDorisPQS test
DORIS_AVAILABLE=true mvn -Dtest=TestDorisTLP test
reducer:
name: Reducer Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
cache: 'maven'
- name: Build
run: mvn -B package -DskipTests=true
- name: Run Tests
run: |
mvn -Dtest=TestStatementReducer test