Skip to content

Commit d35fa16

Browse files
committed
Add MariaDB
1 parent 74825f1 commit d35fa16

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/ci.yml

+44
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,50 @@ 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+
options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3
112+
command: >
113+
--log-bin
114+
--server-id=1
115+
--binlog-format=ROW
116+
117+
steps:
118+
- name: Setup dependencies
119+
run: |
120+
sudo apt-get install -y make gcc mariadb-client
121+
- name: MariaDB versions
122+
run: |
123+
echo -n "mariadb -v: " ; mariadb -V
124+
echo -n "mariadb-dump -V: " ; mariadb-dump -V
125+
echo -n "MariaDB Server (SELECT VERSION()): " ; mariadb -h 127.0.0.1 -u root -BNe 'SELECT VERSION()'
126+
- name: Checkout code
127+
uses: actions/checkout@v4
128+
- name: Install Go
129+
uses: actions/setup-go@v5
130+
with:
131+
go-version: stable
132+
- name: Run tests
133+
run: |
134+
# separate test to avoid RESET MASTER conflict
135+
# TODO: Fix "dump/" and "canal/": mysqldump tries to run SHOW MASTER STATUS on v8.4.0
136+
go test $(go list ./... | grep -v canal | grep -v dump)
137+
# go test $(go list ./... | grep canal | grep -v dump)
94138
95139
golangci:
96140
name: golangci

0 commit comments

Comments
 (0)