Skip to content

Commit f4ae384

Browse files
committed
DEBUG no DB testing
1 parent 8602c24 commit f4ae384

File tree

1 file changed

+4
-175
lines changed

1 file changed

+4
-175
lines changed

.github/workflows/test-unit.yml

+4-175
Original file line numberDiff line numberDiff line change
@@ -79,36 +79,13 @@ jobs:
7979
strategy:
8080
fail-fast: false
8181
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']
8484
include:
8585
- php: 'latest'
8686
type: 'Phpunit Burn'
8787
env:
8888
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
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']
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.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
273162
steps:
274163
- name: Checkout
275164
uses: actions/checkout@v3
@@ -363,10 +252,6 @@ jobs:
363252
364253
- name: Init
365254
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
370255
if [ -n "$LOG_COVERAGE" ]; then mkdir coverage coverage/js; fi
371256
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; }; }
372257
php -d opcache.enable_cli=1 -S 127.0.0.1:8888 > /dev/null 2>&1 &
@@ -384,62 +269,6 @@ jobs:
384269
php demos/_demo-data/create-db.php
385270
vendor/bin/behat -vv --config behat.yml.dist
386271
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-
443272
- name: Upload coverage logs 1/2 (only for coverage)
444273
if: env.LOG_COVERAGE
445274
run: |

0 commit comments

Comments
 (0)