Skip to content

Commit 73938c7

Browse files
committed
CI: Add testing against MariaDB server
1 parent 36d064f commit 73938c7

File tree

2 files changed

+47
-1
lines changed

2 files changed

+47
-1
lines changed

.github/workflows/ci.yml

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: CI
22

33
on: [push, pull_request, workflow_dispatch]
44
jobs:
5-
test:
5+
test-mysql:
66
strategy:
77
# https://www.mysql.com/support/supportedplatforms/database.html
88
matrix:
@@ -63,6 +63,7 @@ jobs:
6363
run: |
6464
sudo debconf-set-selections <<EOF
6565
mysql-apt-config mysql-apt-config/select-server select mysql-8.4-lts
66+
EOF
6667
- if: matrix.client == '9.2'
6768
run: |
6869
sudo debconf-set-selections <<EOF
@@ -80,3 +81,42 @@ jobs:
8081
make
8182
- name: "Run test"
8283
run: make test
84+
85+
test-mariadb:
86+
runs-on: 'ubuntu-latest'
87+
services:
88+
mariadb:
89+
image: 'mariadb:latest'
90+
env:
91+
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: 1
92+
ports:
93+
- 3306:3306
94+
options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3
95+
steps:
96+
- uses: actions/checkout@v4
97+
- name: "Setup generic dependencies"
98+
run: |
99+
sudo apt update
100+
sudo apt install -y \
101+
gcc \
102+
gnupg \
103+
libdbi-perl \
104+
libdevel-checklib-perl \
105+
libtest-deep-perl \
106+
libtest-pod-perl \
107+
lsb-release \
108+
make \
109+
wget
110+
sudo debconf-set-selections <<EOF
111+
mysql-apt-config mysql-apt-config/select-server select mysql-8.4-lts
112+
EOF
113+
wget https://dev.mysql.com/get/mysql-apt-config_0.8.33-1_all.deb
114+
DEBIAN_FRONTEND="noninteractive" sudo dpkg -i mysql-apt-config_0.8.33-1_all.deb
115+
sudo apt update
116+
sudo apt install -y libmysqlclient-dev
117+
- name: "Run build"
118+
run: |
119+
perl Makefile.PL --testhost=127.0.0.1 --testuser=root
120+
make
121+
- name: "Run test"
122+
run: make test

t/51bind_type_guessing.t

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ eval {$dbh= DBI->connect($test_dsn, $test_user, $test_password,
1616
if ($@) {
1717
plan skip_all => "no database connection";
1818
}
19+
20+
# FIXME: Get this test working against MariaDB.
21+
if ($dbh->{'mysql_serverinfo'} =~ 'MariaDB') {
22+
plan skip_all => "This test isn't made to work with MariaDB yet";
23+
}
24+
1925
plan tests => 98;
2026

2127
ok $dbh->do("DROP TABLE IF EXISTS dbd_mysql_t51bind_type_guessing"),

0 commit comments

Comments
 (0)