72
72
mysql :
73
73
image : mysql
74
74
options : --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5 -e MYSQL_ROOT_PASSWORD=test_pass_root -e MYSQL_USER=test_user -e MYSQL_PASSWORD=test_pass -e MYSQL_DATABASE=test_db
75
+ mariadb :
76
+ image : mariadb
77
+ options : --health-cmd="mariadb-admin ping" --health-interval=10s --health-timeout=5s --health-retries=5 -e MYSQL_ROOT_PASSWORD=test_pass_root -e MYSQL_USER=test_user -e MYSQL_PASSWORD=test_pass -e MYSQL_DATABASE=test_db
75
78
postgres :
76
79
image : postgres:12-alpine
77
80
env :
85
88
image : redis:alpine
86
89
redis3 :
87
90
image : redis:alpine
91
+ valkey1 :
92
+ image : valkey/valkey:alpine
93
+ valkey2 :
94
+ image : valkey/valkey:alpine
95
+ valkey3 :
96
+ image : valkey/valkey:alpine
88
97
memcached :
89
98
image : memcached:alpine
90
99
steps :
@@ -109,10 +118,11 @@ jobs:
109
118
- name : Init
110
119
run : |
111
120
php -r '(new PDO("mysql:host=mysql", "root", "test_pass_root"))->exec("ALTER USER '"'"'test_user'"'"'@'"'"'%'"'"' WITH MAX_USER_CONNECTIONS 15");'
121
+ php -r '(new PDO("mysql:host=mariadb", "root", "test_pass_root"))->exec("ALTER USER '"'"'test_user'"'"'@'"'"'%'"'"' WITH MAX_USER_CONNECTIONS 15");'
112
122
php -r '(new PDO("pgsql:host=postgres;dbname=test_db", "test_user", "test_pass"))->exec("ALTER ROLE test_user CONNECTION LIMIT 1");'
113
123
if [ -n "$LOG_COVERAGE" ]; then mkdir coverage; fi
114
124
115
- - name : " Run tests"
125
+ - name : " Run tests 1/2 "
116
126
env :
117
127
MYSQL_DSN : " mysql:host=mysql;dbname=test_db"
118
128
MYSQL_USER : test_user
@@ -125,6 +135,19 @@ jobs:
125
135
run : |
126
136
php -d opcache.enable_cli=1 vendor/bin/phpunit --exclude-group none $(if [ -n "$LOG_COVERAGE" ]; then echo --coverage-text; else echo --no-coverage; fi) --fail-on-warning --fail-on-risky $(if vendor/bin/phpunit --version | grep -q '^PHPUnit 9\.'; then echo -v; else echo --fail-on-notice --fail-on-deprecation --display-notices --display-deprecations --display-warnings --display-errors --display-incomplete --display-skipped; fi)
127
137
138
+ - name : " Run tests 2/2"
139
+ env :
140
+ MYSQL_DSN : " mysql:host=mariadb;dbname=test_db"
141
+ MYSQL_USER : test_user
142
+ MYSQL_PASSWORD : test_pass
143
+ PGSQL_DSN : " pgsql:host=postgres;dbname=test_db"
144
+ PGSQL_USER : test_user
145
+ PGSQL_PASSWORD : test_pass
146
+ REDIS_URIS : " redis://valkey1,redis://valkey2,redis://valkey3"
147
+ MEMCACHE_HOST : memcached
148
+ run : |
149
+ php -d opcache.enable_cli=1 vendor/bin/phpunit --exclude-group none $(if [ -n "$LOG_COVERAGE" ]; then echo --coverage-text; else echo --no-coverage; fi) --fail-on-warning --fail-on-risky $(if vendor/bin/phpunit --version | grep -q '^PHPUnit 9\.'; then echo -v; else echo --fail-on-notice --fail-on-deprecation --display-notices --display-deprecations --display-warnings --display-errors --display-incomplete --display-skipped; fi)
150
+
128
151
- name : Upload coverage (only for coverage)
129
152
if : env.LOG_COVERAGE && false # TODO
130
153
uses : codecov/codecov-action@v5
0 commit comments