Skip to content

Commit baa7795

Browse files
committed
Add MariaDB
1 parent 95f592b commit baa7795

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

.github/workflows/ci.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,52 @@ jobs:
9191
# TODO: Fix "dump/" and "canal/": mysqldump tries to run SHOW MASTER STATUS on v8.4.0
9292
go test $(go list ./... | grep -v canal | grep -v dump)
9393
# go test $(go list ./... | grep canal | grep -v dump)
94+
95+
mariadbtest:
96+
strategy:
97+
matrix:
98+
mariadb_version:
99+
- 10.11
100+
- 11.4
101+
- 11.7
102+
name: Tests with MariaDB ${{ matrix.mariadb_version }}
103+
runs-on: ubuntu-latest
104+
services:
105+
mariadb:
106+
image: mariadb:${{ matrix.mariadb_version }}
107+
env:
108+
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: yes
109+
ports:
110+
- 3306:3306
111+
volumes:
112+
- ./config:/etc/mysql
113+
options: >-
114+
--health-cmd="healthcheck.sh --connect --innodb_initialized"
115+
--health-interval=10s
116+
--health-timeout=5s
117+
--health-retries=3
118+
119+
steps:
120+
- name: Setup dependencies
121+
run: |
122+
sudo apt-get install -y make gcc mariadb-client
123+
- name: MariaDB versions
124+
run: |
125+
echo -n "mariadb -v: " ; mariadb -V
126+
echo -n "mariadb-dump -V: " ; mariadb-dump -V
127+
echo -n "MariaDB Server (SELECT VERSION()): " ; mariadb -h 127.0.0.1 -u root -BNe 'SELECT VERSION()'
128+
- name: Checkout code
129+
uses: actions/checkout@v4
130+
- name: Install Go
131+
uses: actions/setup-go@v5
132+
with:
133+
go-version: stable
134+
- name: Run tests
135+
run: |
136+
# separate test to avoid RESET MASTER conflict
137+
# TODO: Fix "dump/" and "canal/": mysqldump tries to run SHOW MASTER STATUS on v8.4.0
138+
go test $(go list ./... | grep -v canal | grep -v dump)
139+
# go test $(go list ./... | grep canal | grep -v dump)
94140
95141
golangci:
96142
name: golangci

config/mariadb.cnf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[mariadbd]
2+
log_bin
3+
binlog_format=ROW
4+
server_id=1

0 commit comments

Comments
 (0)