Skip to content

Commit c6fa752

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

File tree

1 file changed

+39
-1
lines changed

1 file changed

+39
-1
lines changed

.github/workflows/ci.yml

Lines changed: 39 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:
@@ -80,3 +80,41 @@ jobs:
8080
make
8181
- name: "Run test"
8282
run: make test
83+
84+
test-mariadb:
85+
runs-on: 'ubuntu-latest'
86+
services:
87+
mariadb:
88+
image: 'mariadb:latest'
89+
env:
90+
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: 1
91+
ports:
92+
- 3306:3306
93+
options: --health-cmd="mariadb-admin ping" --health-interval=10s --health-timeout=6s --health-retries=4
94+
steps:
95+
- uses: actions/checkout@v4
96+
- name: "Setup generic dependencies"
97+
run: |
98+
sudo apt update
99+
sudo apt install -y \
100+
gcc \
101+
gnupg \
102+
libdbi-perl \
103+
libdevel-checklib-perl \
104+
libtest-deep-perl \
105+
libtest-pod-perl \
106+
lsb-release \
107+
make \
108+
wget \
109+
sudo debconf-set-selections <<EOF
110+
mysql-apt-config mysql-apt-config/select-server select mysql-8.4-lts
111+
wget https://dev.mysql.com/get/mysql-apt-config_0.8.33-1_all.deb
112+
DEBIAN_FRONTEND="noninteractive" sudo dpkg -i mysql-apt-config_0.8.33-1_all.deb
113+
sudo apt update
114+
sudo apt install -y libmysqlclient-dev
115+
- name: "Run build"
116+
run: |
117+
perl Makefile.PL --testhost=127.0.0.1 --testuser=root
118+
make
119+
- name: "Run test"
120+
run: make test

0 commit comments

Comments
 (0)