@@ -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', '8. 3']
83
- type : ['Phpunit', 'Phpunit Lowest' ]
82
+ php : ['7.4', '8.3']
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.3' && 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
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
93
- mariadb :
94
- image : mariadb
95
- options : --health-cmd="mariadb-admin 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: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@v4
@@ -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) --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)
156
129
if [ -n "$LOG_COVERAGE" ]; then mv coverage/phpunit.cov coverage/phpunit-sqlite.cov; fi
157
130
158
- - name : " Run tests: MySQL (only for cron)"
159
- if : (success() || failure()) && github.event_name == 'schedule'
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) --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)
168
- if [ -n "$LOG_COVERAGE" ]; then mv coverage/phpunit.cov coverage/phpunit-mysql.cov; fi
169
-
170
- - name : " Run tests: MariaDB"
171
- if : success() || failure()
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) --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)
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) --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)
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) --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)
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/free"
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) --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)
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,9 +150,8 @@ jobs:
238
150
strategy :
239
151
fail-fast : false
240
152
matrix :
241
- # Selenium with PHP 7.4 and 8.0 was failing too often on initial/create session request, probably because of older (Alpine 3.16) base image
242
- php : ['8.1', '8.2', '8.3']
243
- type : ['Chrome', 'Chrome Lowest']
153
+ php : ['8.1', '8.3']
154
+ type : ['Chrome']
244
155
include :
245
156
- php : ' latest'
246
157
type : ' Firefox'
@@ -250,29 +161,6 @@ jobs:
250
161
type : ' Firefox Slow'
251
162
env :
252
163
LOG_COVERAGE : " ${{ fromJSON('{true: \" 1\" , false: \"\" }')[matrix.php == '8.3' && matrix.type == 'Chrome' && (github.event_name == 'pull_request' || (github.event_name == 'push' && (github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master')))] }}"
253
- services :
254
- mysql :
255
- image : mysql
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
- mariadb :
258
- image : mariadb
259
- options : --health-cmd="mariadb-admin 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
260
- postgres :
261
- image : postgres:alpine
262
- env :
263
- POSTGRES_USER : atk4_test_user
264
- POSTGRES_PASSWORD : atk4_pass
265
- POSTGRES_DB : atk4_test
266
- options : --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
267
- mssql :
268
- image : mcr.microsoft.com/mssql/server
269
- env :
270
- ACCEPT_EULA : Y
271
- SA_PASSWORD : atk4_pass
272
- oracle :
273
- image : gvenzl/oracle-xe:18-slim-faststart
274
- env :
275
- ORACLE_PASSWORD : atk4_pass
276
164
steps :
277
165
- name : Checkout
278
166
uses : actions/checkout@v4
@@ -362,10 +250,6 @@ jobs:
362
250
363
251
- name : Init
364
252
run : |
365
- php -r '(new PDO("mysql:host=mysql", "root", "atk4_pass_root"))->exec("ALTER USER '"'"'atk4_test_user'"'"'@'"'"'%'"'"' WITH MAX_USER_CONNECTIONS 5");'
366
- php -r '(new PDO("mysql:host=mariadb", "root", "atk4_pass_root"))->exec("ALTER USER '"'"'atk4_test_user'"'"'@'"'"'%'"'"' WITH MAX_USER_CONNECTIONS 5");'
367
- php -r '(new PDO("pgsql:host=postgres;dbname=atk4_test", "atk4_test_user", "atk4_pass"))->exec("ALTER ROLE atk4_test_user CONNECTION LIMIT 1");'
368
- /usr/lib/oracle/setup.sh
369
253
if [ -n "$LOG_COVERAGE" ]; then mkdir coverage coverage/js; fi
370
254
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; }; }
371
255
php -d opcache.enable_cli=1 -S 127.0.0.1:8888 > /dev/null 2>&1 &
@@ -383,62 +267,6 @@ jobs:
383
267
php demos/_demo-data/create-db.php
384
268
vendor/bin/behat -vv --config behat.yml.dist
385
269
386
- - name : " Run tests: MySQL (only for cron)"
387
- if : (success() || failure()) && github.event_name == 'schedule'
388
- env :
389
- DB_DSN : " mysql:host=mysql;dbname=atk4_test"
390
- DB_USER : atk4_test_user
391
- DB_PASSWORD : atk4_pass
392
- run : |
393
- sed -E "s~(\\\$db = new.+Persistence\\\\Sql)\(.+\);~\\1('$DB_DSN', '$DB_USER', '$DB_PASSWORD');~g" -i demos/db.default.php
394
- php demos/_demo-data/create-db.php
395
- vendor/bin/behat -vv --config behat.yml.dist
396
-
397
- - name : " Run tests: MariaDB (only for coverage or cron)"
398
- if : (success() || failure()) && (env.LOG_COVERAGE || github.event_name == 'schedule')
399
- env :
400
- DB_DSN : " mysql:host=mariadb;dbname=atk4_test"
401
- DB_USER : atk4_test_user
402
- DB_PASSWORD : atk4_pass
403
- run : |
404
- sed -E "s~(\\\$db = new.+Persistence\\\\Sql)\(.+\);~\\1('$DB_DSN', '$DB_USER', '$DB_PASSWORD');~g" -i demos/db.default.php
405
- php demos/_demo-data/create-db.php
406
- vendor/bin/behat -vv --config behat.yml.dist
407
-
408
- - name : " Run tests: PostgreSQL (only for cron)"
409
- if : (success() || failure()) && github.event_name == 'schedule'
410
- env :
411
- DB_DSN : " pgsql:host=postgres;dbname=atk4_test"
412
- DB_USER : atk4_test_user
413
- DB_PASSWORD : atk4_pass
414
- run : |
415
- sed -E "s~(\\\$db = new.+Persistence\\\\Sql)\(.+\);~\\1('$DB_DSN', '$DB_USER', '$DB_PASSWORD');~g" -i demos/db.default.php
416
- php demos/_demo-data/create-db.php
417
- vendor/bin/behat -vv --config behat.yml.dist
418
-
419
- - name : " Run tests: MSSQL (only for cron)"
420
- if : (success() || failure()) && github.event_name == 'schedule'
421
- env :
422
- DB_DSN : " sqlsrv:host=mssql;dbname=master;driverOptions[TrustServerCertificate]=1"
423
- DB_USER : sa
424
- DB_PASSWORD : atk4_pass
425
- run : |
426
- sed -E "s~(\\\$db = new.+Persistence\\\\Sql)\(.+\);~\\1('$DB_DSN', '$DB_USER', '$DB_PASSWORD');~g" -i demos/db.default.php
427
- php demos/_demo-data/create-db.php
428
- vendor/bin/behat -vv --config behat.yml.dist
429
-
430
- - name : " Run tests: Oracle (only for cron)"
431
- if : (success() || failure()) && github.event_name == 'schedule'
432
- env :
433
- DB_DSN : " oci:dbname=oracle/free"
434
- DB_USER : system
435
- DB_PASSWORD : atk4_pass
436
- NLS_LANG : AMERICAN_AMERICA.AL32UTF8
437
- run : |
438
- sed -E "s~(\\\$db = new.+Persistence\\\\Sql)\(.+\);~\\1('$DB_DSN', '$DB_USER', '$DB_PASSWORD');~g" -i demos/db.default.php
439
- php demos/_demo-data/create-db.php
440
- vendor/bin/behat -vv --config behat.yml.dist
441
-
442
270
- name : Upload coverage logs 1/2 (only for coverage)
443
271
if : env.LOG_COVERAGE
444
272
run : |
0 commit comments