1
1
name : Database
2
2
3
- on :
3
+ on :
4
4
push :
5
5
paths :
6
6
- " .github/workflows/database.yml"
16
16
17
17
jobs :
18
18
mysql_57 :
19
- runs-on : ubuntu-22 .04
19
+ runs-on : ubuntu-24 .04
20
20
21
21
services :
22
22
mysql :
35
35
36
36
steps :
37
37
- name : Checkout code
38
- uses : actions/checkout@v3
38
+ uses : actions/checkout@v4
39
39
40
40
- name : Setup PHP
41
41
uses : shivammathur/setup-php@v2
46
46
coverage : none
47
47
48
48
- name : Install dependencies
49
- uses : nick-fields/retry@v2
49
+ uses : nick-fields/retry@v3
50
+ with :
51
+ timeout_minutes : 5
52
+ max_attempts : 5
53
+ command : composer update --prefer-stable --prefer-dist --no-interaction --no-progress
54
+
55
+ - name : Execute tests
56
+ run : vendor/bin/phpunit tests/DataBase --exclude-group not-for-mysql5.7
57
+ env :
58
+ DB_CONNECTION : mysql
59
+ DB_USERNAME : root
60
+
61
+ mysql_8 :
62
+ runs-on : ubuntu-24.04
63
+
64
+ services :
65
+ mysql :
66
+ image : mysql:8
67
+ env :
68
+ MYSQL_ALLOW_EMPTY_PASSWORD : yes
69
+ MYSQL_DATABASE : forge
70
+ ports :
71
+ - 3306:3306
72
+ options : --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
73
+
74
+ strategy :
75
+ fail-fast : true
76
+
77
+ name : MySQL 8
78
+
79
+ steps :
80
+ - name : Checkout code
81
+ uses : actions/checkout@v4
82
+
83
+ - name : Setup PHP
84
+ uses : shivammathur/setup-php@v2
85
+ with :
86
+ php-version : 8.1
87
+ extensions : dom, curl, libxml, mbstring, zip, pcntl, pdo, pdo_mysql
88
+ tools : composer:v2
89
+ coverage : none
90
+
91
+ - name : Install dependencies
92
+ uses : nick-fields/retry@v3
50
93
with :
51
94
timeout_minutes : 5
52
95
max_attempts : 5
@@ -57,3 +100,45 @@ jobs:
57
100
env :
58
101
DB_CONNECTION : mysql
59
102
DB_USERNAME : root
103
+
104
+ mariadb :
105
+ runs-on : ubuntu-24.04
106
+
107
+ services :
108
+ mariadb :
109
+ image : mariadb:10
110
+ env :
111
+ MARIADB_ALLOW_EMPTY_ROOT_PASSWORD : yes
112
+ MARIADB_DATABASE : forge
113
+ ports :
114
+ - 3306:3306
115
+ options : --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3
116
+
117
+ strategy :
118
+ fail-fast : true
119
+
120
+ name : MariaDB 10
121
+
122
+ steps :
123
+ - name : Checkout code
124
+ uses : actions/checkout@v4
125
+
126
+ - name : Setup PHP
127
+ uses : shivammathur/setup-php@v2
128
+ with :
129
+ php-version : 8.1
130
+ extensions : dom, curl, libxml, mbstring, zip, pcntl, pdo, pdo_mysql, :php-psr
131
+ tools : composer:v2
132
+ coverage : none
133
+
134
+ - name : Install dependencies
135
+ uses : nick-fields/retry@v3
136
+ with :
137
+ timeout_minutes : 5
138
+ max_attempts : 5
139
+ command : composer update --prefer-stable --prefer-dist --no-interaction --no-progress
140
+
141
+ - name : Execute tests
142
+ run : vendor/bin/phpunit tests/DataBase
143
+ env :
144
+ DB_CONNECTION : mariadb
0 commit comments