-
Notifications
You must be signed in to change notification settings - Fork 73
68 lines (67 loc) · 2 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: CI
on: [push, pull_request, workflow_dispatch]
jobs:
test:
strategy:
# https://www.mysql.com/support/supportedplatforms/database.html
matrix:
include:
- os: ubuntu-20.04
client: "8.0"
server: "8.0"
- os: ubuntu-20.04
client: "8.0"
server: "8.4"
- os: ubuntu-22.04
client: "8.4"
server: "8.4"
- os: ubuntu-22.04
client: "8.4"
server: "8.0"
runs-on: ${{ matrix.os }}
services:
mysql:
image: mysql:${{ matrix.server }}
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: test
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v4
- name: "Setup generic dependencies"
run: |
sudo apt update
sudo apt install -y \
gcc \
gnupg \
libdbi-perl \
libdevel-checklib-perl \
libtest-deep-perl \
libtest-pod-perl \
lsb-release \
make \
wget \
- if: matrix.client == '8.0'
run: |
sudo debconf-set-selections <<EOF
mysql-apt-config mysql-apt-config/select-server select mysql-8.0
EOF
- if: matrix.client == '8.4'
run: |
sudo debconf-set-selections <<EOF
mysql-apt-config mysql-apt-config/select-server select mysql-8.4-lts
EOF
- name: "Setup mysql libs"
run: |
wget https://dev.mysql.com/get/mysql-apt-config_0.8.30-1_all.deb
DEBIAN_FRONTEND="noninteractive" sudo dpkg -i mysql-apt-config_0.8.30-1_all.deb
sudo apt update
sudo apt install -y libmysqlclient-dev
- name: "Run build"
run: |
perl Makefile.PL --testhost=127.0.0.1 --testuser=root
make
- name: "Run test"
run: make test