@@ -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@v3
@@ -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,38 +150,15 @@ 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'
246158 - php : ' latest'
247159 type : ' Chrome Slow'
248160 env :
249161 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')))] }}"
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="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
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
273162 steps :
274163 - name : Checkout
275164 uses : actions/checkout@v3
@@ -359,10 +248,6 @@ jobs:
359248
360249 - name : Init
361250 run : |
362- php -r '(new PDO("mysql:host=mysql", "root", "atk4_pass_root"))->exec("ALTER USER '"'"'atk4_test_user'"'"'@'"'"'%'"'"' WITH MAX_USER_CONNECTIONS 5");'
363- php -r '(new PDO("mysql:host=mariadb", "root", "atk4_pass_root"))->exec("ALTER USER '"'"'atk4_test_user'"'"'@'"'"'%'"'"' WITH MAX_USER_CONNECTIONS 5");'
364- php -r '(new PDO("pgsql:host=postgres;dbname=atk4_test", "atk4_test_user", "atk4_pass"))->exec("ALTER ROLE atk4_test_user CONNECTION LIMIT 1");'
365- /usr/lib/oracle/setup.sh
366251 if [ -n "$LOG_COVERAGE" ]; then mkdir coverage coverage/js; fi
367252 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; }; }
368253 php -d opcache.enable_cli=1 -S 127.0.0.1:8888 > /dev/null 2>&1 &
@@ -380,62 +265,6 @@ jobs:
380265 php demos/_demo-data/create-db.php
381266 vendor/bin/behat -vv --config behat.yml.dist
382267
383- - name : " Run tests: MySQL (only for coverage or cron)"
384- if : (success() || failure()) && (env.LOG_COVERAGE || github.event_name == 'schedule')
385- env :
386- DB_DSN : " mysql:host=mysql;dbname=atk4_test"
387- DB_USER : atk4_test_user
388- DB_PASSWORD : atk4_pass
389- run : |
390- sed -E "s~(\\\$db = new.+Persistence\\\\Sql)\(.+\);~\\1('$DB_DSN', '$DB_USER', '$DB_PASSWORD');~g" -i demos/db.default.php
391- php demos/_demo-data/create-db.php
392- vendor/bin/behat -vv --config behat.yml.dist
393-
394- - name : " Run tests: MariaDB (only for cron)"
395- if : (success() || failure()) && github.event_name == 'schedule'
396- env :
397- DB_DSN : " mysql:host=mariadb;dbname=atk4_test"
398- DB_USER : atk4_test_user
399- DB_PASSWORD : atk4_pass
400- run : |
401- sed -E "s~(\\\$db = new.+Persistence\\\\Sql)\(.+\);~\\1('$DB_DSN', '$DB_USER', '$DB_PASSWORD');~g" -i demos/db.default.php
402- php demos/_demo-data/create-db.php
403- vendor/bin/behat -vv --config behat.yml.dist
404-
405- - name : " Run tests: PostgreSQL (only for cron)"
406- if : (success() || failure()) && github.event_name == 'schedule'
407- env :
408- DB_DSN : " pgsql:host=postgres;dbname=atk4_test"
409- DB_USER : atk4_test_user
410- DB_PASSWORD : atk4_pass
411- run : |
412- sed -E "s~(\\\$db = new.+Persistence\\\\Sql)\(.+\);~\\1('$DB_DSN', '$DB_USER', '$DB_PASSWORD');~g" -i demos/db.default.php
413- php demos/_demo-data/create-db.php
414- vendor/bin/behat -vv --config behat.yml.dist
415-
416- - name : " Run tests: MSSQL (only for cron)"
417- if : (success() || failure()) && github.event_name == 'schedule'
418- env :
419- DB_DSN : " sqlsrv:host=mssql;dbname=master;driverOptions[TrustServerCertificate]=1"
420- DB_USER : sa
421- DB_PASSWORD : atk4_pass
422- run : |
423- sed -E "s~(\\\$db = new.+Persistence\\\\Sql)\(.+\);~\\1('$DB_DSN', '$DB_USER', '$DB_PASSWORD');~g" -i demos/db.default.php
424- php demos/_demo-data/create-db.php
425- vendor/bin/behat -vv --config behat.yml.dist
426-
427- - name : " Run tests: Oracle (only for cron)"
428- if : (success() || failure()) && github.event_name == 'schedule'
429- env :
430- DB_DSN : " oci:dbname=oracle/xe"
431- DB_USER : system
432- DB_PASSWORD : atk4_pass
433- NLS_LANG : AMERICAN_AMERICA.AL32UTF8
434- run : |
435- sed -E "s~(\\\$db = new.+Persistence\\\\Sql)\(.+\);~\\1('$DB_DSN', '$DB_USER', '$DB_PASSWORD');~g" -i demos/db.default.php
436- php demos/_demo-data/create-db.php
437- vendor/bin/behat -vv --config behat.yml.dist
438-
439268 - name : Upload coverage logs 1/2 (only for coverage)
440269 if : env.LOG_COVERAGE
441270 run : |
0 commit comments