@@ -79,36 +79,13 @@ jobs:
7979 strategy :
8080 fail-fast : false
8181 matrix :
82- php : ['7.4', ' 8.0', '8.1', '8.2', '8.3 ']
83- type : ['Phpunit', 'Phpunit Lowest' ]
82+ php : ['8.0', '8.2 ']
83+ type : ['Phpunit']
8484 include :
8585 - php : ' latest'
8686 type : ' Phpunit Burn'
8787 env :
8888 LOG_COVERAGE : " ${{ fromJSON('{true: \" 1\" , false: \"\" }')[matrix.php == '8.2' && 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="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: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
11289 steps :
11390 - name : Checkout
11491 uses : actions/checkout@v4
@@ -143,10 +120,6 @@ jobs:
143120
144121 - name : Init
145122 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
150123 if [ -n "$LOG_COVERAGE" ]; then mkdir coverage; fi
151124
152125 - name : " Run tests: SQLite"
@@ -155,67 +128,6 @@ jobs:
155128 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
156129 if [ -n "$LOG_COVERAGE" ]; then mv coverage/phpunit.cov coverage/phpunit-sqlite.cov; fi
157130
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-
219131 - name : Upload coverage logs 1/2 (only for latest Phpunit)
220132 if : env.LOG_COVERAGE
221133 run : |
@@ -238,8 +150,8 @@ jobs:
238150 strategy :
239151 fail-fast : false
240152 matrix :
241- php : ['7.4', ' 8.0', '8.1', '8.2', '8.3 ']
242- type : ['Chrome', 'Chrome Lowest' ]
153+ php : ['8.0', '8.2 ']
154+ type : ['Chrome']
243155 include :
244156 - php : ' latest'
245157 type : ' Firefox'
@@ -249,29 +161,6 @@ jobs:
249161 type : ' Firefox Slow'
250162 env :
251163 LOG_COVERAGE : " ${{ fromJSON('{true: \" 1\" , false: \"\" }')[matrix.php == '8.2' && matrix.type == 'Chrome' && (github.event_name == 'pull_request' || (github.event_name == 'push' && (github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master')))] }}"
252- services :
253- mysql :
254- image : mysql:8
255- 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"
256- mariadb :
257- image : mariadb
258- 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
259- postgres :
260- image : postgres:12-alpine
261- env :
262- POSTGRES_USER : atk4_test_user
263- POSTGRES_PASSWORD : atk4_pass
264- POSTGRES_DB : atk4_test
265- options : --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
266- mssql :
267- image : mcr.microsoft.com/mssql/server
268- env :
269- ACCEPT_EULA : Y
270- SA_PASSWORD : atk4_pass
271- oracle :
272- image : gvenzl/oracle-xe:18-slim-faststart
273- env :
274- ORACLE_PASSWORD : atk4_pass
275164 steps :
276165 - name : Checkout
277166 uses : actions/checkout@v4
@@ -361,10 +250,6 @@ jobs:
361250
362251 - name : Init
363252 run : |
364- php -r '(new PDO("mysql:host=mysql", "root", "atk4_pass_root"))->exec("ALTER USER '"'"'atk4_test_user'"'"'@'"'"'%'"'"' WITH MAX_USER_CONNECTIONS 5");'
365- php -r '(new PDO("mysql:host=mariadb", "root", "atk4_pass_root"))->exec("ALTER USER '"'"'atk4_test_user'"'"'@'"'"'%'"'"' WITH MAX_USER_CONNECTIONS 5");'
366- php -r '(new PDO("pgsql:host=postgres;dbname=atk4_test", "atk4_test_user", "atk4_pass"))->exec("ALTER ROLE atk4_test_user CONNECTION LIMIT 1");'
367- /usr/lib/oracle/setup.sh
368253 if [ -n "$LOG_COVERAGE" ]; then mkdir coverage coverage/js; fi
369254 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; }; }
370255 php -d opcache.enable_cli=1 -S 127.0.0.1:8888 > /dev/null 2>&1 &
@@ -382,62 +267,6 @@ jobs:
382267 php demos/_demo-data/create-db.php
383268 vendor/bin/behat -vv --config behat.yml.dist
384269
385- - name : " Run tests: MySQL (only for coverage or cron)"
386- if : (success() || failure()) && (env.LOG_COVERAGE || github.event_name == 'schedule')
387- env :
388- DB_DSN : " mysql:host=mysql;dbname=atk4_test"
389- DB_USER : atk4_test_user
390- DB_PASSWORD : atk4_pass
391- run : |
392- sed -E "s~(\\\$db = new.+Persistence\\\\Sql)\(.+\);~\\1('$DB_DSN', '$DB_USER', '$DB_PASSWORD');~g" -i demos/db.default.php
393- php demos/_demo-data/create-db.php
394- vendor/bin/behat -vv --config behat.yml.dist
395-
396- - name : " Run tests: MariaDB (only for cron)"
397- if : (success() || failure()) && github.event_name == 'schedule'
398- env :
399- DB_DSN : " mysql:host=mariadb;dbname=atk4_test"
400- DB_USER : atk4_test_user
401- DB_PASSWORD : atk4_pass
402- run : |
403- sed -E "s~(\\\$db = new.+Persistence\\\\Sql)\(.+\);~\\1('$DB_DSN', '$DB_USER', '$DB_PASSWORD');~g" -i demos/db.default.php
404- php demos/_demo-data/create-db.php
405- vendor/bin/behat -vv --config behat.yml.dist
406-
407- - name : " Run tests: PostgreSQL (only for cron)"
408- if : (success() || failure()) && github.event_name == 'schedule'
409- env :
410- DB_DSN : " pgsql:host=postgres;dbname=atk4_test"
411- DB_USER : atk4_test_user
412- DB_PASSWORD : atk4_pass
413- run : |
414- sed -E "s~(\\\$db = new.+Persistence\\\\Sql)\(.+\);~\\1('$DB_DSN', '$DB_USER', '$DB_PASSWORD');~g" -i demos/db.default.php
415- php demos/_demo-data/create-db.php
416- vendor/bin/behat -vv --config behat.yml.dist
417-
418- - name : " Run tests: MSSQL (only for cron)"
419- if : (success() || failure()) && github.event_name == 'schedule'
420- env :
421- DB_DSN : " sqlsrv:host=mssql;dbname=master;driverOptions[TrustServerCertificate]=1"
422- DB_USER : sa
423- DB_PASSWORD : atk4_pass
424- run : |
425- sed -E "s~(\\\$db = new.+Persistence\\\\Sql)\(.+\);~\\1('$DB_DSN', '$DB_USER', '$DB_PASSWORD');~g" -i demos/db.default.php
426- php demos/_demo-data/create-db.php
427- vendor/bin/behat -vv --config behat.yml.dist
428-
429- - name : " Run tests: Oracle (only for cron)"
430- if : (success() || failure()) && github.event_name == 'schedule'
431- env :
432- DB_DSN : " oci:dbname=oracle/xe"
433- DB_USER : system
434- DB_PASSWORD : atk4_pass
435- NLS_LANG : AMERICAN_AMERICA.AL32UTF8
436- run : |
437- sed -E "s~(\\\$db = new.+Persistence\\\\Sql)\(.+\);~\\1('$DB_DSN', '$DB_USER', '$DB_PASSWORD');~g" -i demos/db.default.php
438- php demos/_demo-data/create-db.php
439- vendor/bin/behat -vv --config behat.yml.dist
440-
441270 - name : Upload coverage logs 1/2 (only for coverage)
442271 if : env.LOG_COVERAGE
443272 run : |
0 commit comments