Skip to content

Commit cb002cb

Browse files
committed
Add MariaDB
1 parent 74825f1 commit cb002cb

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/ci.yml

+40
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,46 @@ 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+
113+
steps:
114+
- name: MariaDB versions
115+
run: |
116+
echo -n "mysql -v: " ; mysql -V
117+
echo -n "mysqldump -V: " ; mysqldump -V
118+
echo -n "MariaDB Server (SELECT VERSION()): " ; mariadb -h 127.0.0.1 -u root -BNe 'SELECT VERSION()'
119+
- name: Prepare for Go
120+
run: |
121+
sudo apt-get install -y make gcc mariadb-client
122+
- name: Checkout code
123+
uses: actions/checkout@v4
124+
- name: Install Go
125+
uses: actions/setup-go@v5
126+
with:
127+
go-version: stable
128+
- name: Run tests
129+
run: |
130+
# separate test to avoid RESET MASTER conflict
131+
# TODO: Fix "dump/" and "canal/": mysqldump tries to run SHOW MASTER STATUS on v8.4.0
132+
go test $(go list ./... | grep -v canal | grep -v dump)
133+
# go test $(go list ./... | grep canal | grep -v dump)
94134
95135
golangci:
96136
name: golangci

0 commit comments

Comments
 (0)