@@ -79,36 +79,13 @@ jobs:
79
79
strategy :
80
80
fail-fast : false
81
81
matrix :
82
- php : ['7.4', ' 8.0', '8.1 ', '8.2']
83
- type : ['Phpunit', 'Phpunit Lowest' ]
82
+ php : ['8.0', '8.2']
83
+ type : ['Phpunit']
84
84
include :
85
85
- php : ' latest'
86
86
type : ' Phpunit Burn'
87
87
env :
88
88
LOG_COVERAGE : " ${{ fromJSON('{true: \" 1\" , false: \"\" }')[matrix.php == '8.0' && matrix.type == 'Phpunit' && (github.event_name == 'pull_request' || (github.event_name == 'push' && (github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master')))] }}"
89
- services :
90
- mysql :
91
- image : mysql:8
92
- options : --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5 -e MYSQL_ROOT_PASSWORD=atk4_pass_root -e MYSQL_USER=atk4_test_user -e MYSQL_PASSWORD=atk4_pass -e MYSQL_DATABASE=atk4_test --entrypoint sh mysql:8 -c "exec docker-entrypoint.sh mysqld --default-authentication-plugin=mysql_native_password"
93
- mariadb :
94
- image : mariadb
95
- options : --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5 -e MYSQL_ROOT_PASSWORD=atk4_pass_root -e MYSQL_USER=atk4_test_user -e MYSQL_PASSWORD=atk4_pass -e MYSQL_DATABASE=atk4_test
96
- postgres :
97
- image : postgres:12-alpine
98
- env :
99
- POSTGRES_USER : atk4_test_user
100
- POSTGRES_PASSWORD : atk4_pass
101
- POSTGRES_DB : atk4_test
102
- options : --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
103
- mssql :
104
- image : mcr.microsoft.com/mssql/server
105
- env :
106
- ACCEPT_EULA : Y
107
- SA_PASSWORD : atk4_pass
108
- oracle :
109
- image : gvenzl/oracle-xe:18-slim-faststart
110
- env :
111
- ORACLE_PASSWORD : atk4_pass
112
89
steps :
113
90
- name : Checkout
114
91
uses : actions/checkout@v3
@@ -143,10 +120,6 @@ jobs:
143
120
144
121
- name : Init
145
122
run : |
146
- php -r '(new PDO("mysql:host=mysql", "root", "atk4_pass_root"))->exec("ALTER USER '"'"'atk4_test_user'"'"'@'"'"'%'"'"' WITH MAX_USER_CONNECTIONS 5");'
147
- php -r '(new PDO("mysql:host=mariadb", "root", "atk4_pass_root"))->exec("ALTER USER '"'"'atk4_test_user'"'"'@'"'"'%'"'"' WITH MAX_USER_CONNECTIONS 5");'
148
- php -r '(new PDO("pgsql:host=postgres;dbname=atk4_test", "atk4_test_user", "atk4_pass"))->exec("ALTER ROLE atk4_test_user CONNECTION LIMIT 1");'
149
- /usr/lib/oracle/setup.sh
150
123
if [ -n "$LOG_COVERAGE" ]; then mkdir coverage; fi
151
124
152
125
- name : " Run tests: SQLite"
@@ -155,67 +128,6 @@ jobs:
155
128
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) -v
156
129
if [ -n "$LOG_COVERAGE" ]; then mv coverage/phpunit.cov coverage/phpunit-sqlite.cov; fi
157
130
158
- - name : " Run tests: MySQL"
159
- if : success() || failure()
160
- env :
161
- DB_DSN : " mysql:host=mysql;dbname=atk4_test"
162
- DB_USER : atk4_test_user
163
- DB_PASSWORD : atk4_pass
164
- run : |
165
- sed -E "s~(\\\$db = new.+Persistence\\\\Sql)\(.+\);~\\1('$DB_DSN', '$DB_USER', '$DB_PASSWORD');~g" -i demos/db.default.php
166
- php demos/_demo-data/create-db.php
167
- 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) -v
168
- if [ -n "$LOG_COVERAGE" ]; then mv coverage/phpunit.cov coverage/phpunit-mysql.cov; fi
169
-
170
- - name : " Run tests: MariaDB (only for cron)"
171
- if : (success() || failure()) && github.event_name == 'schedule'
172
- env :
173
- DB_DSN : " mysql:host=mariadb;dbname=atk4_test"
174
- DB_USER : atk4_test_user
175
- DB_PASSWORD : atk4_pass
176
- run : |
177
- sed -E "s~(\\\$db = new.+Persistence\\\\Sql)\(.+\);~\\1('$DB_DSN', '$DB_USER', '$DB_PASSWORD');~g" -i demos/db.default.php
178
- php demos/_demo-data/create-db.php
179
- 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) -v
180
- if [ -n "$LOG_COVERAGE" ]; then mv coverage/phpunit.cov coverage/phpunit-mariadb.cov; fi
181
-
182
- - name : " Run tests: PostgreSQL (only for cron)"
183
- if : (success() || failure()) && github.event_name == 'schedule'
184
- env :
185
- DB_DSN : " pgsql:host=postgres;dbname=atk4_test"
186
- DB_USER : atk4_test_user
187
- DB_PASSWORD : atk4_pass
188
- run : |
189
- sed -E "s~(\\\$db = new.+Persistence\\\\Sql)\(.+\);~\\1('$DB_DSN', '$DB_USER', '$DB_PASSWORD');~g" -i demos/db.default.php
190
- php demos/_demo-data/create-db.php
191
- 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) -v
192
- if [ -n "$LOG_COVERAGE" ]; then mv coverage/phpunit.cov coverage/phpunit-postgres.cov; fi
193
-
194
- - name : " Run tests: MSSQL (only for cron)"
195
- if : (success() || failure()) && github.event_name == 'schedule'
196
- env :
197
- DB_DSN : " sqlsrv:host=mssql;dbname=master;driverOptions[TrustServerCertificate]=1"
198
- DB_USER : sa
199
- DB_PASSWORD : atk4_pass
200
- run : |
201
- sed -E "s~(\\\$db = new.+Persistence\\\\Sql)\(.+\);~\\1('$DB_DSN', '$DB_USER', '$DB_PASSWORD');~g" -i demos/db.default.php
202
- php demos/_demo-data/create-db.php
203
- 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) -v
204
- if [ -n "$LOG_COVERAGE" ]; then mv coverage/phpunit.cov coverage/phpunit-mssql.cov; fi
205
-
206
- - name : " Run tests: Oracle (only for cron)"
207
- if : (success() || failure()) && github.event_name == 'schedule'
208
- env :
209
- DB_DSN : " oci:dbname=oracle/xe"
210
- DB_USER : system
211
- DB_PASSWORD : atk4_pass
212
- NLS_LANG : AMERICAN_AMERICA.AL32UTF8
213
- run : |
214
- sed -E "s~(\\\$db = new.+Persistence\\\\Sql)\(.+\);~\\1('$DB_DSN', '$DB_USER', '$DB_PASSWORD');~g" -i demos/db.default.php
215
- php demos/_demo-data/create-db.php
216
- 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) -v
217
- if [ -n "$LOG_COVERAGE" ]; then mv coverage/phpunit.cov coverage/phpunit-oracle.cov; fi
218
-
219
131
- name : Upload coverage logs 1/2 (only for latest Phpunit)
220
132
if : env.LOG_COVERAGE
221
133
run : |
@@ -238,38 +150,15 @@ jobs:
238
150
strategy :
239
151
fail-fast : false
240
152
matrix :
241
- php : ['7.4', ' 8.0', '8.1 ', '8.2']
242
- type : ['Chrome', 'Chrome Lowest' ]
153
+ php : ['8.0', '8.2']
154
+ type : ['Chrome']
243
155
include :
244
156
- php : ' latest'
245
157
type : ' Firefox'
246
158
- php : ' latest'
247
159
type : ' Chrome Slow'
248
160
env :
249
161
LOG_COVERAGE : " ${{ fromJSON('{true: \" 1\" , false: \"\" }')[matrix.php == '8.0' && matrix.type == 'Chrome' && (github.event_name == 'pull_request' || (github.event_name == 'push' && (github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master')))] }}"
250
- services :
251
- mysql :
252
- image : mysql:8
253
- options : --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5 -e MYSQL_ROOT_PASSWORD=atk4_pass_root -e MYSQL_USER=atk4_test_user -e MYSQL_PASSWORD=atk4_pass -e MYSQL_DATABASE=atk4_test --entrypoint sh mysql:8 -c "exec docker-entrypoint.sh mysqld --default-authentication-plugin=mysql_native_password"
254
- mariadb :
255
- image : mariadb
256
- options : --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5 -e MYSQL_ROOT_PASSWORD=atk4_pass_root -e MYSQL_USER=atk4_test_user -e MYSQL_PASSWORD=atk4_pass -e MYSQL_DATABASE=atk4_test
257
- postgres :
258
- image : postgres:12-alpine
259
- env :
260
- POSTGRES_USER : atk4_test_user
261
- POSTGRES_PASSWORD : atk4_pass
262
- POSTGRES_DB : atk4_test
263
- options : --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
264
- mssql :
265
- image : mcr.microsoft.com/mssql/server
266
- env :
267
- ACCEPT_EULA : Y
268
- SA_PASSWORD : atk4_pass
269
- oracle :
270
- image : gvenzl/oracle-xe:18-slim-faststart
271
- env :
272
- ORACLE_PASSWORD : atk4_pass
273
162
steps :
274
163
- name : Checkout
275
164
uses : actions/checkout@v3
@@ -363,10 +252,6 @@ jobs:
363
252
364
253
- name : Init
365
254
run : |
366
- php -r '(new PDO("mysql:host=mysql", "root", "atk4_pass_root"))->exec("ALTER USER '"'"'atk4_test_user'"'"'@'"'"'%'"'"' WITH MAX_USER_CONNECTIONS 5");'
367
- php -r '(new PDO("mysql:host=mariadb", "root", "atk4_pass_root"))->exec("ALTER USER '"'"'atk4_test_user'"'"'@'"'"'%'"'"' WITH MAX_USER_CONNECTIONS 5");'
368
- php -r '(new PDO("pgsql:host=postgres;dbname=atk4_test", "atk4_test_user", "atk4_pass"))->exec("ALTER ROLE atk4_test_user CONNECTION LIMIT 1");'
369
- /usr/lib/oracle/setup.sh
370
255
if [ -n "$LOG_COVERAGE" ]; then mkdir coverage coverage/js; fi
371
256
ci_wait_until () { timeout 30 sh -c "until { $1 2> /dev/null; }; do sleep 0.02; done" || timeout 15 sh -c "$1" || { echo "health timeout: $1"; exit 1; }; }
372
257
php -d opcache.enable_cli=1 -S 127.0.0.1:8888 > /dev/null 2>&1 &
@@ -384,62 +269,6 @@ jobs:
384
269
php demos/_demo-data/create-db.php
385
270
vendor/bin/behat -vv --config behat.yml.dist
386
271
387
- - name : " Run tests: MySQL (only for coverage or cron)"
388
- if : (success() || failure()) && (env.LOG_COVERAGE || github.event_name == 'schedule')
389
- env :
390
- DB_DSN : " mysql:host=mysql;dbname=atk4_test"
391
- DB_USER : atk4_test_user
392
- DB_PASSWORD : atk4_pass
393
- run : |
394
- sed -E "s~(\\\$db = new.+Persistence\\\\Sql)\(.+\);~\\1('$DB_DSN', '$DB_USER', '$DB_PASSWORD');~g" -i demos/db.default.php
395
- php demos/_demo-data/create-db.php
396
- vendor/bin/behat -vv --config behat.yml.dist
397
-
398
- - name : " Run tests: MariaDB (only for cron)"
399
- if : (success() || failure()) && github.event_name == 'schedule'
400
- env :
401
- DB_DSN : " mysql:host=mariadb;dbname=atk4_test"
402
- DB_USER : atk4_test_user
403
- DB_PASSWORD : atk4_pass
404
- run : |
405
- sed -E "s~(\\\$db = new.+Persistence\\\\Sql)\(.+\);~\\1('$DB_DSN', '$DB_USER', '$DB_PASSWORD');~g" -i demos/db.default.php
406
- php demos/_demo-data/create-db.php
407
- vendor/bin/behat -vv --config behat.yml.dist
408
-
409
- - name : " Run tests: PostgreSQL (only for cron)"
410
- if : (success() || failure()) && github.event_name == 'schedule'
411
- env :
412
- DB_DSN : " pgsql:host=postgres;dbname=atk4_test"
413
- DB_USER : atk4_test_user
414
- DB_PASSWORD : atk4_pass
415
- run : |
416
- sed -E "s~(\\\$db = new.+Persistence\\\\Sql)\(.+\);~\\1('$DB_DSN', '$DB_USER', '$DB_PASSWORD');~g" -i demos/db.default.php
417
- php demos/_demo-data/create-db.php
418
- vendor/bin/behat -vv --config behat.yml.dist
419
-
420
- - name : " Run tests: MSSQL (only for cron)"
421
- if : (success() || failure()) && github.event_name == 'schedule'
422
- env :
423
- DB_DSN : " sqlsrv:host=mssql;dbname=master;driverOptions[TrustServerCertificate]=1"
424
- DB_USER : sa
425
- DB_PASSWORD : atk4_pass
426
- run : |
427
- sed -E "s~(\\\$db = new.+Persistence\\\\Sql)\(.+\);~\\1('$DB_DSN', '$DB_USER', '$DB_PASSWORD');~g" -i demos/db.default.php
428
- php demos/_demo-data/create-db.php
429
- vendor/bin/behat -vv --config behat.yml.dist
430
-
431
- - name : " Run tests: Oracle (only for cron)"
432
- if : (success() || failure()) && github.event_name == 'schedule'
433
- env :
434
- DB_DSN : " oci:dbname=oracle/xe"
435
- DB_USER : system
436
- DB_PASSWORD : atk4_pass
437
- NLS_LANG : AMERICAN_AMERICA.AL32UTF8
438
- run : |
439
- sed -E "s~(\\\$db = new.+Persistence\\\\Sql)\(.+\);~\\1('$DB_DSN', '$DB_USER', '$DB_PASSWORD');~g" -i demos/db.default.php
440
- php demos/_demo-data/create-db.php
441
- vendor/bin/behat -vv --config behat.yml.dist
442
-
443
272
- name : Upload coverage logs 1/2 (only for coverage)
444
273
if : env.LOG_COVERAGE
445
274
run : |
0 commit comments